diff --git a/content/en/docs/tasks/federation/set-up-cluster-federation-kubefed.md b/content/en/docs/tasks/federation/set-up-cluster-federation-kubefed.md index 14584b7ef8..bba21741bc 100644 --- a/content/en/docs/tasks/federation/set-up-cluster-federation-kubefed.md +++ b/content/en/docs/tasks/federation/set-up-cluster-federation-kubefed.md @@ -420,11 +420,15 @@ To join clusters into the federation: 1. Change the context: - kubectl config use-context fellowship + ```shell + kubectl config use-context fellowship + ``` 1. If you are using a managed cluster service, allow the service to access the cluster. To do this, create a `clusterrolebinding` for the account associated with your cluster service: - kubectl create clusterrolebinding -cluster-admin-binding --clusterrole=cluster-admin --user=@example.org --context= + ```shell + kubectl create clusterrolebinding -cluster-admin-binding --clusterrole=cluster-admin --user=@example.org --context= + ``` 1. Join the cluster to the federation, using `kubefed join`, and make sure you provide the following: @@ -433,7 +437,7 @@ To join clusters into the federation: For example, this command adds the cluster `gondor` to the federation running on host cluster `rivendell`: - ``` + ```shell kubefed join gondor --host-cluster-context=rivendell ``` @@ -512,7 +516,7 @@ To remove a cluster from a federation, run the [`kubefed unjoin`](/docs/admin/ku command with the cluster name and the federation's `--host-cluster-context`: -``` +```shell kubefed unjoin gondor --host-cluster-context=rivendell ``` @@ -525,7 +529,7 @@ the persistent storage volume dynamically provisioned for the federation control plane's etcd. You can delete the federation namespace by running the following command: -``` +```shell kubectl delete ns federation-system --context=rivendell ```