kubectl is a simple image for running kubectl and serves as the base for other
K8S automation images. It was built with the purpose of running within a live
K8S cluster but can also be run locally so long as authentication is mounted.
It was basically copied from here:
As a base image for your own Dockerfile:
kubectl is available within the container.
$ docker run ceroic/kubectl which kubectl /usr/local/bin/kubectl
If you'd like to test locally, perhaps using compose or while creating a
derived image, you can mount your local authentication as a volume.
$ docker run -v ~/.kube:/root/.kube ceroic/kubectl kubectl get po
Docker Compose Example
version: '2' services: kubectl: image: ceroic/kubectl volumes: - ~/.kube:/root/.kube:ro command: kubectl get po