karmada
karmada copied to clipboard
Support multiple label selection ability in EtcdNodeSelectorLabels
What type of PR is this? /kind feature
What this PR does / why we need it: Supports the function of --etcd-node-selector-labels for multiple labels of nodes in the cluster
user@virtual-machine:karmada/_output/bin/linux/amd64# ./karmadactl init --etcd-node-selector-labels karmada.io/etcd=true,kubernetes.io/os=linux
I0830 09:58:51.083493 7186 deploy.go:111] No default release version found. build version: version.Info{GitVersion:"", GitCommit:"0c4ff310f2d3bba4c54a513c62bc4110e5353b32", GitTreeState:"clean", BuildDate:"2024-08-30T01:35:17Z", GoVersion:"go1.22.6", Compiler:"gc", Platform:"linux/amd64"}
I0830 09:58:51.083581 7186 enable_option.go:85] No default release version found. build version: version.Info{GitVersion:"", GitCommit:"0c4ff310f2d3bba4c54a513c62bc4110e5353b32", GitTreeState:"clean", BuildDate:"2024-08-30T01:35:17Z", GoVersion:"go1.22.6", Compiler:"gc", Platform:"linux/amd64"}
......
I0830 10:01:43.161625 7186 deploy.go:502] Create karmada webhook Deployment
I0830 10:01:43.167256 7186 idempotency.go:296] Service karmada-system/karmada-webhook has been created or updated.
------------------------------------------------------------------------------------------------------
█████ ████ █████████ ███████████ ██████ ██████ █████████ ██████████ █████████
░░███ ███░ ███░░░░░███ ░░███░░░░░███ ░░██████ ██████ ███░░░░░███ ░░███░░░░███ ███░░░░░███
░███ ███ ░███ ░███ ░███ ░███ ░███░█████░███ ░███ ░███ ░███ ░░███ ░███ ░███
░███████ ░███████████ ░██████████ ░███░░███ ░███ ░███████████ ░███ ░███ ░███████████
░███░░███ ░███░░░░░███ ░███░░░░░███ ░███ ░░░ ░███ ░███░░░░░███ ░███ ░███ ░███░░░░░███
░███ ░░███ ░███ ░███ ░███ ░███ ░███ ░███ ░███ ░███ ░███ ███ ░███ ░███
█████ ░░████ █████ █████ █████ █████ █████ █████ █████ █████ ██████████ █████ █████
░░░░░ ░░░░ ░░░░░ ░░░░░ ░░░░░ ░░░░░ ░░░░░ ░░░░░ ░░░░░ ░░░░░ ░░░░░░░░░░ ░░░░░ ░░░░░
------------------------------------------------------------------------------------------------------
Karmada is installed successfully.
Register Kubernetes cluster to Karmada control plane.
Register cluster with 'Push' mode
Step 1: Use "karmadactl join" command to register the cluster to Karmada control plane. --cluster-kubeconfig is kubeconfig of the member cluster.
(In karmada)~# MEMBER_CLUSTER_NAME=$(cat ~/.kube/config | grep current-context | sed 's/: /\n/g'| sed '1d')
(In karmada)~# karmadactl --kubeconfig /etc/karmada/karmada-apiserver.config join ${MEMBER_CLUSTER_NAME} --cluster-kubeconfig=$HOME/.kube/config
Step 2: Show members of karmada
(In karmada)~# kubectl --kubeconfig /etc/karmada/karmada-apiserver.config get clusters
Register cluster with 'Pull' mode
Step 1: Use "karmadactl register" command to register the cluster to Karmada control plane. "--cluster-name" is set to cluster of current-context by default.
(In member cluster)~# karmadactl register 172.18.0.2:32443 --token ofc912.rk5yj36jfc9es9by --discovery-token-ca-cert-hash sha256:82c3150ef0593fe5f581078cb6ccfc597a0043a45ff2af028b302d1cd53ad9f9
Step 2: Show members of karmada
(In karmada)~# kubectl --kubeconfig /etc/karmada/karmada-apiserver.config get clusters
user@virtual-machine:karmada/_output/bin/linux/amd64#
Which issue(s) this PR fixes: Fixes #5320 This PR is related to the documentation PR: https://github.com/karmada-io/karmada/pull/5277 Special notes for your reviewer: @liangyuanpeng Does this PR introduce a user-facing change?: