Toolbox for k8s in the Sidero ecosystem that adds talosctl
and omnictl
to the alpine/k8s image of existing tools such as kubectl
, helm
and others.
The image allows optional authentication environment variables to allow omnictl
to automatically authenticate, and has a slim variant with only talosctl
and omnictl
.
Images are posted on dockerhub and can be tried using:
- full version
docker run -it ryandellolio/alpine-k8s-omni /bin/sh
- slim version
docker run -it ryandellolio/alpine-k8s-omni:slim /bin/sh
- Before building, you must include the
omnictl-<env>-<arch>
binary from your Omni dashboard in the root of your repository, and optionally update theCOPY
command in the Dockerfile if you are using a different architecture - If using optional authentication, you must create an omni service account and pass the given environment variables to retrieve the token. See below.
- Build with
docker build --no-cache -t alpine-k8s-omni .
- Run with
docker run -it --rm alpine-k8s-omni /bin/sh
If you set OMNI_ENDPOINT
and OMNI_SERVICE_ACCOUNT_KEY
environment variables, omnictl
will automatically authenticate in the container and can be used immediately for cluster operations.
- For testing purposes, you can put the required environment variables in
.env
usingomnictl serviceaccount create spot-operator > .env
and remove excess text. Store securely. - Build with
docker build --no-cache -t alpine-k8s-omni .
- Run with
docker run -it --rm --env-file ./.env alpine-k8s-omni /bin/sh
to try it out.
Use buildx to build and push to docker hub.
The following build commands allow locally pushing to dockerhub on multiple architectures using buildx
docker buildx build --push \
--platform linux/amd64,linux/arm64 \
--tag ryandellolio/alpine-k8s-omni:latest .
docker buildx build -f Dockerfile-slim --push \
--platform linux/amd64,linux/arm64 \
--tag ryandellolio/alpine-k8s-omni:slim .
docker buildx build -f Dockerfile --push \
--platform linux/amd64,linux/arm64 \
--tag ryandellolio/alpine-k8s-omni:0.1.1 .
docker buildx build -f Dockerfile-slim --push \
--platform linux/amd64,linux/arm64 \
--tag ryandellolio/alpine-k8s-omni:0.1.1-slim .
If you don't need all of the bells and whistles of alpine/k8s and just need omnictl
and talosctl
, you can use the slim version of this image whose base is alpine:latest
- Automatically authenticate
talosctl
, pending feasibility analysis - Automate the build process