No description
| .woodpecker | ||
| .hadolint.yaml | ||
| cog.toml | ||
| Dockerfile | ||
| Justfile | ||
| LICENSE.md | ||
| README.md | ||
| renovate.json | ||
kubectl Docker Image
A minimal Alpine-based Docker image containing kubectl, kustomize, and helm for Kubernetes operations.
What's included
- kubectl - Kubernetes command-line tool
- kustomize - Kubernetes native configuration management
- helm - Kubernetes package manager
- Alpine Linux - Small and secure base image
Usage
Basic usage
docker run --rm -it \
-v "$HOME/.kube:/root/.kube:ro" \
kubectl get pods
Using with kustomize
docker run --rm -it \
-v "$PWD:/work" \
-w /work \
kubectl kustomize build .
Using with helm
docker run --rm -it \
-v "$PWD:/work" \
-w /work \
kubectl helm template my-release ./chart
Interactive shell
docker run --rm -it \
-v "$HOME/.kube:/root/.kube:ro" \
-v "$PWD:/work" \
-w /work \
kubectl sh
Kubernetes configuration
Mount your kubeconfig to access your clusters:
docker run --rm -it \
-v "$HOME/.kube:/root/.kube:ro" \
kubectl cluster-info
For production use, consider using Kubernetes secrets or service accounts instead of mounting kubeconfig files.
Image tags
latest- Latest versionmain- Latest build from main branchvX.Y.Z- Versioned releases
Pull the image:
docker pull codeberg.org/purplebooth/kubectl:main
Building locally
docker build -t kubectl .
License
This project is released under The Unlicense. See LICENSE.