Skip to content

--kubeconfig option does not work #365

@nirs

Description

@nirs

The command help document --kubeconfig flag:

% kubectl rook-ceph -h  
...                                               
Flags:
      --context string              Kubernetes context to use
  -h, --help                        help for rook-ceph
      --kubeconfig string           kubernetes config path
  -n, --namespace string            Kubernetes namespace where CephCluster is created (default "rook-ceph")
      --operator-namespace string   Kubernetes namespace where rook operator is running

But trying to use the flag we fail with:

% kubectl rook-ceph --kubeconfig c1.yaml -n openshift-storage ceph status
Error: invalid configuration: no configuration has been provided, try setting KUBERNETES_MASTER environment variable

This works:

% KUBECONFIG=c1.yaml kubectl rook-ceph -n openshift-storage ceph status  
Info: running 'ceph' command with args: [status]
  cluster:
    id:     18b77a48-b64a-4665-a339-b9c1da4669e3
    health: HEALTH_WARN
            1 daemons have recently crashed
... 

Version tested:

% kubectl krew list                                                      
PLUGIN     VERSION
krew       v0.4.5
rook-ceph  v0.9.3

% kubectl version --kubeconfig c1.yaml
Client Version: v1.32.3
Kustomize Version: v5.5.0
Server Version: v1.31.6

 % sw_vers
ProductName:		macOS
ProductVersion:		15.3.2
BuildVersion:		24D81

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions