Last active
December 14, 2022 09:35
-
-
Save amitkrishna/1ee0586c806a3d99639646654e6a6438 to your computer and use it in GitHub Desktop.
k8s cli hacks
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
- Customized Column output | |
$>kubectl get pods -A -o custom-columns=NAMESPACE:.metadata.namespace,NAME:.metadata.name,NODE:.spec.nodeName,HOSTIP:.status.hostIP,PHASE:.status.phase,START_TIME:.metadata.creationTimestamp --sort-by=.metadata.creationTimestamp | |
- Delete taint from K8s clusters | |
$> kubectl patch node node1.compute.internal -p '{"spec":{"taints":[]}}' | |
$> kubectl get nodes -o json | jq '.items[].spec' | |
$> kubectl get nodes -o json | jq '.items[].spec.taints' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment