Sign inSign up

ceroic/kubectl

By ceroic

•Updated about 10 years ago

Docker image for running kubectl within a container.

Image
1

1.2K

ceroic/kubectl repository overview

⁠Ceroic kubectl

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:

https://github.com/kubernetes/kubernetes/tree/master/examples/kubectl-container⁠

⁠Usage:

As a base image for your own Dockerfile:

FROM ceroic/kubectl:latest

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

Tag summary

Content type

Image

Digest

Size

347.8 MB

Last updated

about 10 years ago

docker pull ceroic/kubectl