You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using Teleport tsh login to connect to a cluster, although kubectl works fine, kops does not, because, in general, the Teleport name of the cluster is not the same as the kops cluster name. This leads to an error like
⧉ staging (staging:default)+
√ : (cpco-staging-admin) helmfiles ⨠ kops validate cluster
Validating cluster us-west-2.staging.cpco.io
Cannot load kubecfg settings for "us-west-2.staging.cpco.io": context "us-west-2.staging.cpco.io" does not exist
why
kops needs the name of the cluster in 2 places: its configuration in its state store and the context setting in KUBECONFIG. It has a --name flag to set the name, but it still expects it to be the same in both places. Typically, however, the Teleport name of the cluster is different due to Teleport requirements.
workaround
There is a workaround. After tsh login you can run:
what
When using Teleport
tsh login
to connect to a cluster, althoughkubectl
works fine,kops
does not, because, in general, the Teleport name of the cluster is not the same as thekops
cluster name. This leads to an error likewhy
kops
needs the name of the cluster in 2 places: its configuration in its state store and the context setting inKUBECONFIG
. It has a--name
flag to set the name, but it still expects it to be the same in both places. Typically, however, the Teleport name of the cluster is different due to Teleport requirements.workaround
There is a workaround. After
tsh login
you can run:This enables
kops
to find the correct context and does not botherkubectl
because technically the context name is independent of the cluster name.The text was updated successfully, but these errors were encountered: