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

Add runbook for node terminal access #3194

Merged
merged 2 commits into from
Sep 13, 2021
Merged

Add runbook for node terminal access #3194

merged 2 commits into from
Sep 13, 2021

Conversation

poornima-krishnasamy
Copy link
Contributor

Closes: #2962


```
kubectl get nodes # To get the list of nodes and their names
kubectl describe node <node name you want to shell into>`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

| grep 'ProviderID' | awk -F '/' '{print $NF}' might help

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a bit more work:

kubectl --context live get nodes -ojson | jq -r '.items[] | "\( .metadata.labels["kubernetes.io/hostname"] + " " + (.spec.providerID | split("/")[4]) )"'

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

kubernodes () { kubectl --context live get nodes -ojson | jq -r '.items[] | "\( .metadata.labels["kubernetes.io/hostname"] + " " + (.spec.providerID | split("/")[4]) )"' ; } ; export -f kubernodes

@poornima-krishnasamy poornima-krishnasamy merged commit 651b969 into main Sep 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Install AWS Systems Manager
2 participants