How to work with POD in Kubernete with kubectl commands

For using the bash shell of POD

kubectl exec -it <podname> -- /bin/bash
Example
kubectl exec -it POD1 -- /bin/bash
-- In case of POD has multi container pod then we specify the container name
kubectl exec -it <podname> --container <containername> -- /bin/bash
example:
kubectl exec -it POD1 --container CONTAINER1 -- /bin/bash

Check Logs of POD

kubectl logs <podname>
Example: kubectl logs POD1

To access the application of POD in local system

kubectl port-forward <PODNAME> LOCALPORT:CONTAINERPORT
Example:
kubectl port-forward POD1 8080:8080
Run in background
kubectl port-forward POD1 8080:8080 &

Monitor the Kubectl event run behind the commands enable this command:

kubectl get events --watch &
-- this command run in background and give output when you execute any kubenete commands

Create a manifest file with kubectl command

kubectl run hello-world --image=nginx cop --dry-run=client -o yaml --port=8080