get inside kubernetes pod code example
Example 1: kubernetes get inside pod
kubectl exec -it <pod-name> -- sh
Example 2: kubernetes /bin/bash
sudo kubectl -n <namespace> --context=<context-with-access> exec <pod-name> -it /bin/bash
ex:
sudo kubectl -n default --context=staging-devops exec microservice1-jd830k-880 -it /bin/bash
Example 3: kubectl exec ls -lah
kubectl exec <pod_name> -- ls -la /