-
Notifications
You must be signed in to change notification settings - Fork 916
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support karmactl config to modifies kubeconfig files #4297
Comments
/assign |
I believe that If we support switching |
Is that true? How Karmada is installed? By operator , helm or cli? |
By hack/local-up-karmada.sh |
If karmadactl will only connect to karmada-apiserver, then we must limit its kubeconfig and hardcode its context to karmada-apiserver, or do you have a better idea?
Good question. In fact, karmadactl can only perform corresponding operations based on the provided kubeconfig and context. It does not know whether the cluster is a member cluster, in other words, each cluster can be a control plane. If the |
Echo from the output of Local Karmada is running.
To start using your karmada, run:
export KUBECONFIG=/root/.kube/karmada.config
Please use 'kubectl config use-context karmada-host/karmada-apiserver' to switch the host and control plane cluster.
To manage your member clusters, run:
export KUBECONFIG=/root/.kube/members.config
Please use 'kubectl config use-context member1/member2/member3' to switch to the different member cluster. Yes, the default context( contexts:
- context:
cluster: karmada-apiserver
user: karmada-apiserver
name: karmada-apiserver
- context:
cluster: kind-karmada-host
user: kind-karmada-host
name: karmada-host
current-context: karmada-host Wouldn't it be better to take |
I guess taking |
@zhzhuang-zju Any thoughts about the question #4297 (comment) asked by @chaunceyjiang ? |
I agree that |
When Karmada is installed successfully, $ karmadactl config set-karmada-context karmada-apiserver # $HOME/.kube/karmada.config
apiVersion: v1
extensions:
- name: karmada-context
extension:
karmada-apiserver
... $ karmadactl config get-karmada-context
karmada-apiserver
WDYT? @chaunceyjiang @RainbowMango |
What would you like to be added:
Support karmactl config to modifies kubeconfig files. The specific work items are as follows:
Why is this needed:
Referring to #4291 (comment), each time karmada is installed, the default context is
karmada-host
. We need use kubectl to modify the current-context before karmadactl can be used normally. As a result, karmadactl cannot be completely independent and the user experience is fragmented.The text was updated successfully, but these errors were encountered: