Skip to content

Instantly share code, notes, and snippets.

@clrxbl
Last active May 25, 2020 10:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save clrxbl/77d88d4d8076c138f163ef4787ac6518 to your computer and use it in GitHub Desktop.
Save clrxbl/77d88d4d8076c138f163ef4787ac6518 to your computer and use it in GitHub Desktop.
#!/bin/bash
CURRENT_IP=$(hostname -I | cut -d' ' -f1)
CURRENT_NODE=$(kubectl get nodes -o wide | grep "$CURRENT_IP" | cut -d " " -f1)
kubectl label node $CURRENT_NODE node-role.kubernetes.io/worker=worker
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment