Skip to content

Instantly share code, notes, and snippets.

@chaudharisuresh997
Last active October 21, 2020 08:15
Show Gist options
  • Save chaudharisuresh997/640651b823bbf16f8df9582371609567 to your computer and use it in GitHub Desktop.
Save chaudharisuresh997/640651b823bbf16f8df9582371609567 to your computer and use it in GitHub Desktop.
KUBECTL commands
#Connect to pod
kubectl exec --stdin --tty shell-demo-pod -- /bin/bash
#for alpine image
kubectl exec --stdin --tty shell-demo-pod -- /bin/sh
#PING the kubernetes service
>nslookup "endpoint service ip"
#MOngo commands
#switch to collection
show dbs
usedbname
#get data in collection
db.collectionname.find()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment