Last active
May 19, 2016 20:06
-
-
Save devth/4fb6346b2b9b04039be3badf0d85fbd5 to your computer and use it in GitHub Desktop.
Obtain metadata in pods
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Useful for installing kubectl in a docker image | |
curl -L -O https://storage.googleapis.com/kubernetes-release/release/v1.2.4/bin/linux/amd64/kubectl | |
# obtain the node name inside a pod | |
KUBERNETES_NODENAME=`kubectl get pods --namespace=${KUBERNETES_NAMESPACE} ${KUBERNETES_PODNAME} -o json | jq -r .spec.nodeName` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment