Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save amaurybsouza/201d4d4826449aa92629897db646781b to your computer and use it in GitHub Desktop.

Select an option

Save amaurybsouza/201d4d4826449aa92629897db646781b to your computer and use it in GitHub Desktop.
kubernetes_cluster_get_nodes
# ansible k8s -m shell -a "kubectl get nodes" -i inventory.yml
k8s | CHANGED | rc=0 >>
NAME STATUS ROLES AGE VERSION
kubernetes-cluster Ready control-plane 2d23h v1.24.2
kubernetes-node01 Ready <none> 2d23h v1.24.1
kubernetes-node02 Ready <none> 2d23h v1.24.1
kubernetes-node03 Ready <none> 2d23h v1.24.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment