A Docker image with tools for working with Kubernetes and Helm:
- kubectl - CLI for managing Kubernetes clusters
- helm - package manager for Kubernetes
- helm-diff - Helm plugin for showing differences between releases
- helmfile - declarative way to manage Helm releases
docker run -it --rm ghcr.io/your-username/iac-tools:latest# Build with default versions
docker build -t iac-tools .
# Build with specific versions
docker build \
--build-arg KUBECTL_VERSION=v1.33.0 \
--build-arg HELM_VERSION=v3.13.0 \
--build-arg HELMFILE_VERSION=v1.0.0 \
-t iac-tools .docker run -it --rm iac-toolsdocker run -it --rm -v $(pwd):/workspace iac-toolsdocker run -it --rm -v ~/.kube:/root/.kube iac-tools kubectl get podsdocker run -it --rm -v ~/.kube:/root/.kube iac-tools helm listdocker run -it --rm -v $(pwd):/workspace -v ~/.kube:/root/.kube iac-tools helmfile apply# List available charts
docker run -it --rm iac-tools ls -la /workspace/charts
# Install a chart from the included repository
docker run -it --rm -v ~/.kube:/root/.kube iac-tools helm install my-release /workspace/charts/my-chart# Check kubectl version
docker run --rm iac-tools kubectl version --client
# Check helm version
docker run --rm iac-tools helm version
# Check installed helm plugins
docker run --rm iac-tools helm plugin list
# Check helmfile version
docker run --rm iac-tools helmfile versionThe image supports standard environment variables for kubectl and helm:
KUBECONFIG- path to kubectl configuration fileHELM_KUBECONFIG- path to helm configuration file
- name: Deploy with helmfile
run: |
docker run --rm \
-v ${{ github.workspace }}:/workspace \
-v $HOME/.kube:/root/.kube \
-e KUBECONFIG=/root/.kube/config \
ghcr.io/your-username/iac-tools:latest helmfile applydeploy:
image: ghcr.io/your-username/iac-tools:latest
script:
- helmfile apply
before_script:
- echo "$KUBECONFIG" | base64 -d > /root/.kube/config| Tool | Version | Description |
|---|---|---|
| kubectl | Configurable (default: v1.33.0) | Kubernetes command-line tool |
| helm | Configurable (default: v3.14.0) | Kubernetes package manager |
| helm-diff | Latest | Helm plugin for diffing releases |
| helmfile | Configurable (default: v1.1.5) | Declarative Helm deployments |
The image includes helm charts from the repository https://github.com/ilyario/ah-helm-charts.git. Only the contents of the charts/ directory are copied to /workspace/charts in the container.
You can specify versions for kubectl, Helm, and helmfile using build arguments:
KUBECTL_VERSION- kubectl version (default: v1.33.0)HELM_VERSION- Helm version (default: v3.14.0)HELMFILE_VERSION- helmfile version (default: v1.1.5)
This image is automatically scanned for vulnerabilities using:
- Trivy vulnerability scanner
- Hadolint for Dockerfile best practices
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request
This project is licensed under the MIT License.