k8s things

Adding an EKS cluster to kubeconfig

aws eks update-kubeconfig --region [region] --name [cluster name]

Run a Ubuntu Pod in a Cluster to Debug Something

2023 Update

Add this to your .zshrc (or equiv) and use it to drop a debug container in your cluster:

alias kshell='kubectl run -it --image bash --restart Never --rm shell'

One of these days I’m gonna push an image to Dockerhub that has all the tools I need so I don’t need to apt update; apt install curl;, etc - but that is not today. :)

kubectl run --rm -it --image=ubuntu debugme -- /bin/bash -l

Run a Ubuntu Container in Docker

docker run --name test -it --rm ubuntu

Run a Debug Container in an existing pod

kubectl debug -it podname --image=ubuntu --target=containername -n namespace

Run a Ubuntu Container with PowerShell (No arm64 images yet)

docker run --name test -it --rm --platform=linux/amd64 mcr.microsoft.com/powershell

Run a Specific Arch for a Docker Image

docker run --name test -it --rm --platform=linux/amd64 ubuntu

Helm Stuff

Pull a specific chart version:

helm pull ingress-nginx/ingress-nginx --version 3.11.1

See what versions of a chart are available:

helm search repo ingress-nginx/ingress-nginx --versions

Cleanup Docker Things

docker system prune --volumes