kubectl Command
By Bys on August 1, 2023
kubectl
kubectl --help
# -o jsonpath
kubectl get deploy coredns -n kube-system -o jsonpath='{.spec.template.spec.containers[0].name}{":\t"}{.spec.template.spec.containers[0].image}{"\n"}'
kubectl get ds efs-csi-node -n kube-system -o jsonpath='{"hostNetwork:"}{"\t"}{.spec.template.spec.hostNetwork}{"\n"}'
k get nodes ip-10-20-11-153.ap-northeast-2.compute.internal -o jsonpath='{.spec.providerID}{"\t"}'
# --show-managed-fields
kubectl get nodes ip-10-20-10-82.ap-northeast-2.compute.internal -o yaml --show-managed-fields
# taints
kubectl taint node1 key1=value1:NoSchedule
kubectl taint node1 key1=value1:NoExecute
cli
kubectl
]