Skip to content

Instantly share code, notes, and snippets.

@joshy91
Created July 12, 2018 17:37
Show Gist options
  • Save joshy91/7703ac2020346fc89b0afeb9c2e11890 to your computer and use it in GitHub Desktop.
Save joshy91/7703ac2020346fc89b0afeb9c2e11890 to your computer and use it in GitHub Desktop.
#!/bin/bash
#Basic status checks in kubernetes
#Check status of cluster
kubectl get nodes
#Determine if memory is low on specified node
kubectl describe node joshy914.mylabserver.com | grep MemoryPressure
#Determine if disk space is low on specified node
kubectl describe node joshy914.mylabserver.com | grep DiskPressure
#List pods running on specified node
kubectl get pods --all-namespaces -o wide | grep joshy914
#List pods running in kube-system namespace
kubectl get pods -n kube-system
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment