Kubernetes command-line tool.
179
This repository provides a Docker image based on Ubuntu 20.04 that installs kubectl, the Kubernetes command-line tool. The image is designed to be lightweight and includes only the necessary components to run kubectl. This can be particularly useful for CI/CD pipelines, administrative tasks, or any situation where you need to interact with a Kubernetes cluster from within a containerized environment.
curl and kubectlkubectl: The image fetches the latest stable version of kubectl at build time.KUBECONFIG is set to ./config, allowing for flexible configuration management.To pull the image from the repository, use the following command:
docker pull neutralize/kubectl:latest
To run the container and check the kubectl version, use:
docker run --rm neutralize/kubectl:latest
You can mount your Kubernetes configuration file into the container to use kubectl with your cluster:
docker run --rm -v /path/to/your/kubeconfig:/config neutralize/kubectl:latest
Replace /path/to/your/kubeconfig with the path to your Kubernetes configuration file.
List all Kubernetes nodes:
docker run --rm -v /path/to/your/kubeconfig:/config neutralize/kubectl:latest get nodes
Apply a Kubernetes configuration:
docker run --rm -v /path/to/your/kubeconfig:/config -v /path/to/your/k8s-config:/k8s-config neutralize/kubectl:latest apply -f /k8s-config
If you want to build the image locally, clone this repository and run:
docker build -t neutralize/kubectl:latest .
KUBECONFIG: Path to the Kubernetes configuration file (default is ./config).Content type
Image
Digest
sha256:1e33ae613…
Size
113.2 MB
Last updated
over 2 years ago
docker pull neutralize/kubectl