Skip to content
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

Doc/gardenctl config #163

Merged
merged 8 commits into from
Oct 21, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
no mo export 2
  • Loading branch information
etiennnr authored and petersutter committed Oct 21, 2022
commit 20a3b7c4dbd06fa5b0959da8c69a9be4067cba20
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,14 @@ Example `config` command:
export KUBECONFIG=~/relative/path/to/kubeconfig.yaml

# Method 1 : Fetch cluster-identity of garden cluster from the configmap
export CLUSTER_IDENTITY=$(kubectl -n kube-system get configmap cluster-identity -ojsonpath={.data.cluster-identity})
CLUSTER_IDENTITY=$(kubectl -n kube-system get configmap cluster-identity -ojsonpath={.data.cluster-identity})
# OR
# Method 2 : If you don't have access to the kube-system namespace in the garden cluster, the garden cluster-identity can also be extracted from every shoot's yaml
PROJECT="your-project-name" # Change to your project name
SHOOT="your-shoot-name" # Change to any shoot's name in your project
PREFIX="shoot--$PROJECT--$SHOOT-"$(kubectl get shoot -n garden-$PROJECT $SHOOT -ojsonpath={.metadata.uid})"-"
STATUS=$(kubectl get shoot -n garden-$PROJECT $SHOOT -ojsonpath={.status.clusterIdentity})
export CLUSTER_IDENTITY=$(echo ${STATUS#$PREFIX}) # difference between both
CLUSTER_IDENTITY=$(echo ${STATUS#$PREFIX}) # difference between both

# Configure garden cluster
gardenctl config set-garden $CLUSTER_IDENTITY --kubeconfig $KUBECONFIG
Expand Down