Last active
March 2, 2019 22:25
-
-
Save davidwalter0/1883e2b3d0f96e18f464d4fc9000e745 to your computer and use it in GitHub Desktop.
kubernetes / jq example rule
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
#!/bin/bash | |
kubectl get no -o json|jq -r '.items[]|select(.metadata.name == "node1.example.com")|.metadata' | cat - | |
curl 0.0.0.0:8080/api/v1/nodes|jq -r '.items[]|select(.metadata.name == "node1.example.com")|.metadata' | cat - | |
kubectl get no -o json|jq -r '.items[]|select(.metadata.name == "node1.example.com")|.metadata.annotations."flannel.alpha.coreos.com/backend-data"' | cat - | |
curl -s 0.0.0.0:8080/api/v1/nodes|jq -r '.items[]|select(.metadata.name == "node1.example.com")|.metadata.annotations.flannel.alpha.coreos.com/backend-data' | cat - |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment