Snooping on your Kubernetes nodes containers without ssh’ing to it: dink
Sometimes you have this issue. You are developing, you are being lazy with image tags. You just want to keep pulling ‘latest’. But, caching, how does it work, why does it cache when I don’t want? You seem to be running a stale version.
Or perhaps you want to snoop around a running container a bit.
Sure you could ssh to your Kubernetes node. But, that’s a big song and dance on Azure AKS. There must be a better way to quickly get a comand-line that has access to the Docker commands, that has access to the node itself?
I present ‘dink’ (Docker in Kubernetes). Its pretty self explanatory, you can see it below. Feel free to enjoy, to break things and never complain to me about how I just handed you a loaded gun and a 3-line readme file.
$ git clone https://github.com/Agilicus/dink Cloning into 'dink'... ... don@cube:~/src$ cd dink don@cube:~/src/dink$ kubectl get nodes NAME STATUS ROLES AGE VERSION aks-agentpool-16358131-0 Ready agent 14d v1.11.5 aks-agentpool-16358131-1 Ready agent 6d v1.11.5 aks-agentpool-16358131-2 Ready agent 6d v1.11.5 don@cube:~/src/dink$ ./dink -n aks-agentpool-16358131-0 bash-4.4# docker images REPOSITORY TAG IMAGE ID CREATED SIZE agilicus/dink latest 61e27c1721b5 3 minutes ago 277MB cr.agilicus.com/utilities/dink latest 70a7f24d8c90