Alpine vs Busybox: how to wget in K8s

In the last projects, I get used to use K8s CronJob(s) to schedule tasks.

The most effective way of doing it, is to create a super-tiny cronjob, which the sole purpose is to call a REST webbook(s) of a specific microservice, to fire some action in a predictable way.

The microservice can be kept inside the namespace and not exposed outside for maximum security, if you like.

But in a lot of banking environment, you cannot download image from docker hub, and creating a CI/CD pipline to just execute a wget or a curl is an overkill.

I spent some time trying to get busybox inside the image registry of that bank, with little success.

Then I discovered the alpine image can be used for the exact same purpose:

# Just show me the header: hopefully the hook will respond 200 if all ok
docker run -ti alpine:latest wget --spider -S https://gioorgi.com

Alpine image is bigger than busybox, but it can solve your problem and it is based on busybox too.

Happy hacking!