Kubernetes pods are not Virtual Machines, so you cannot log in to them in the traditional sense. However, you can execute commands within a container using the kubectl exec command.
kubectl exec <pod-name> -- <command>
Ensure that the container contains the binary for the specified command, or the execution will fail.
For more information, refer to the Kubernetes documentation on Getting a Shell to a Container.
If you have multiple namespaces, specify the namespace where your pod resides before executing the command.
kubectl exec -n <namespace> <pod-name> -it -- /bin/sh
Once you have accessed the pod, you can navigate through the container as needed.
Alternatively, you can use the following command to access the container inside the pod:
kubectl exec -it < your pod name which you want to access> -- /bin/bash