Sign inSign up

bartlettc/docker-kubectl

By bartlettc

•Updated almost 9 years ago

Containerized Kubernetes kubectl

Image
0

10K+

bartlettc/docker-kubectl repository overview

⁠Kubernetes Utilities

This project contains Kubernetes⁠ related utilities for use in build/deploy pipelines that have docker.

The following utilities are included:

  • kubectl⁠ is a CLI tool to manage a Kubernetes cluster
  • kops⁠ - CLI tool to create, destroy, upgrade Kubernetes clusters in cloud service providers
  • helm⁠ - Kubernetes packaging/deployment tool
⁠Why use it

It's mostly meant to be used during continuous integration or as part of an automated build/deployment:

  • So that your machine (e.g. build server) doesn't need kubectl or other cli tools to be installed; only Docker.
  • To avoid kubectl config use-context and similar to affect your build and other projects' builds.

⁠Usage

$ docker run --rm bartlettc22/kubectl kubectl --help
⁠Usage example 1

For example to access a local Kubernetes cluster you may run:

$ docker run --rm --net=host --user $UID \
    -v ~/.kube:/config/.kube \
    cbartlett22/kubectl kubectl cluster-info
⁠Usage: kubectl
docker run --rm -it \
  -v ${HOME}/.aws:/config/.aws \
  -e "AWS_PROFILE=$AWS_PROFILE" \
  -e "KOPS_NAME=blue.testcluster.io" \
  -e "KOPS_STATE_STORE=s3://kubectl-state" \
  bartlettc/docker-kubectl \
  sh -c "kops export kubecfg --name \$KOPS_NAME; kubecfg version"

Tag summary

Content type

Image

Digest

Size

101.4 MB

Last updated

almost 9 years ago

docker pull bartlettc/docker-kubectl