-
Notifications
You must be signed in to change notification settings - Fork 97
Kubectl Commands
Anvesh Muppeda edited this page Mar 31, 2023
·
1 revision
To login to a pod Syntax:
kubectl exec <nginx-pod> -n <namespace> -it -- /bin/bash
Example:
kubectl exec nginx-7f456874f4-vdmxm -n anvesh -it -- /bin/bash
To forward the traffic
Syntax:
k port-forward service/<service-name> -n <namespace> <ourexposingport>:<podport>
Example:
k port-forward service/ngnix-service -n anvesh 8080:80
Designed by Anvesh Muppeda