Skip to content

Instantly share code, notes, and snippets.

@agu3rra
Last active September 29, 2020 13:36
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 agu3rra/93bc58282470ebb7d4a7d3f70c902ded to your computer and use it in GitHub Desktop.
Save agu3rra/93bc58282470ebb7d4a7d3f70c902ded to your computer and use it in GitHub Desktop.
Userful Kubernetes Commands
az aks get-credentials -g <resourceGroup> -n <clusterName>
kubectl create namespace [namespacenamehere]
kubectl config set-context --current --namespace=[namehere]
kubectl exec --stdin --tty [podname] -- [command]
kubectl create -f samplePod.yml
kubectl logs pods/[podname]
kubectl apply -f deployment.yml --record
kubectl rollout stauts deployment [namehere]
kubectl rollout history deployment [namehere]
kubectl undo deployment [namehere] --to-revision=1
kubectl get events --all-namespaces --sort-by='.metadata.creationTimestamp'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment