kubectl get pod by name code example
Example 1: kubernetes get inside pod
kubectl exec -it <pod-name> -- sh
Example 2: kubectl get pod by node
kubectl get pods --all-namespaces -o wide --field-selector spec.nodeName=<node>
Example 3: kubectl get only pod name
kubectl get pods --template '{{range .items}}{{.metadata.name}}{{end}}' --selector=app=<CONTAINER-NAME>
//replace <CONTAINER-NAME> with your service container name
Example 4: kubectl describe to yaml
kubectl describe <type> <name> -o yaml