Skip to content

Instantly share code, notes, and snippets.

@adamhancock
adamhancock / install-docker-kube.sh
Last active July 30, 2024 08:13 — forked from chadmcrowell/install-docker-kube.sh
Installing the Kubernetes Cluster - From CKA Course - Linux Academy
# Get the Docker gpg key
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
# Add the Docker repository
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable"
# Get the Kubernetes gpg key
curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add -
@adamhancock
adamhancock / k8s_evicted_pods.sh
Created September 21, 2020 15:27
Delete evicted pods from all namespaces in Kubernetes
kubectl get po -A --all-namespaces -o json | jq '.items[] | select(.status.reason!=null) | select(.status.reason | contains("Evicted")) | "kubectl delete po \(.metadata.name) -n \(.metadata.namespace)"' | xargs -n 1 bash -c
- --serverstransport.insecureskipverify=true
- --entrypoints.websecure.http.tls=true
{
"semi": false,
"singleQuote": true,
"printWidth": 150,
"htmlWhitespaceSensitivity": "ignore"
}