Skip to content

Instantly share code, notes, and snippets.

@Awan
Last active July 7, 2023 01:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Awan/e75dd1d163e86b3a8233860c533879aa to your computer and use it in GitHub Desktop.
Save Awan/e75dd1d163e86b3a8233860c533879aa to your computer and use it in GitHub Desktop.
kubernetes basic commands
## List environments
kubectl exec $pod -- env
## Run bash interactive shell inside some pod
kubectl exec -ti $pod -- bash
## Services
1 - ClusterIP
This type exposes the service on internal IP. Only reachable from within the cluster.
2 - NodePort
Makes service available from outside the cluster using NodeIP:NodePort
3 - LoadBalancer
Creates a load balancer in current cloud and assigns a fixed exteranl IP to the service.
4 - ExternalName
Maps the service to the contents of `ExternalName` field by returning `CNAME` record with its value.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment