All Projects → wernight → Docker Kubectl

wernight / Docker Kubectl

Containerized Kubernetes kubectl

Projects that are alternatives of or similar to Docker Kubectl

Helm Kubectl
Docker Hub image with helm and kubectl on top of alpine linux with bash
Stars: ✭ 233 (+348.08%)
Mutual labels:  docker-image, kubectl
Alpine Erlang
An alpine image with Erlang installed, intended for releases
Stars: ✭ 73 (+40.38%)
Mutual labels:  alpine-linux, docker-image
Laravel Docker K8s
Running Laravel project using Docker and Deploying using Kubernetes
Stars: ✭ 127 (+144.23%)
Mutual labels:  docker-image, kubectl
Docker Ruby Node
🐳 Alpine Docker Image with latest versions of Ruby, Node.js and yarn installed. This Docker Image is actively maintained and updated regularly.
Stars: ✭ 74 (+42.31%)
Mutual labels:  alpine-linux, docker-image
Alpine Vim
"dockerized" Vim
Stars: ✭ 242 (+365.38%)
Mutual labels:  alpine-linux, docker-image
Docker Alpine
Docker containers running Alpine Linux and s6 for process management. Solid, reliable containers.
Stars: ✭ 574 (+1003.85%)
Mutual labels:  alpine-linux, docker-image
Socat
Run socat command in alpine container
Stars: ✭ 53 (+1.92%)
Mutual labels:  alpine-linux, docker-image
Svn Docker
Lightweight Docker image to build a container running an SVN server
Stars: ✭ 87 (+67.31%)
Mutual labels:  alpine-linux, docker-image
Docker Oidc Proxy
Docker Image built on Alpine Linux for secure OpenID Connect (OIDC) proxy authentication
Stars: ✭ 91 (+75%)
Mutual labels:  alpine-linux, docker-image
dockerfiles
Skeleton for a Docker nginx / php / mysql / redis development stack. Everything in its own container!
Stars: ✭ 12 (-76.92%)
Mutual labels:  docker-image, alpine-linux
Jekyll Docker
⛴ Docker images, and CI builders for Jekyll.
Stars: ✭ 804 (+1446.15%)
Mutual labels:  alpine-linux, docker-image
Docker Redmine
Docker Image for Redmine
Stars: ✭ 1,044 (+1907.69%)
Mutual labels:  docker-image
Chatwoot
Open-source customer engagement suite, an alternative to Intercom, Zendesk, Salesforce Service Cloud etc. 🔥💬
Stars: ✭ 11,554 (+22119.23%)
Mutual labels:  docker-image
Pmbootstrap
Repository has been moved! https://postmarketos.org/move.html#/pmbootstrap 🚚 🚚 🚚
Stars: ✭ 1,010 (+1842.31%)
Mutual labels:  alpine-linux
Docker Liferay Portal
Stars: ✭ 41 (-21.15%)
Mutual labels:  docker-image
Docker Bind
Bind caching DNS server on Debian with wild-card domain support
Stars: ✭ 50 (-3.85%)
Mutual labels:  docker-image
Docker registry cli
Docker Registry CLI - Provides search functionality for Docker Registry (UI and CLI)
Stars: ✭ 48 (-7.69%)
Mutual labels:  docker-image
Helm Docker
☸️ helm, gcloud, kubectl, jq
Stars: ✭ 41 (-21.15%)
Mutual labels:  kubectl
Weblogic Image Tool
Oracle WebLogic Image Tool
Stars: ✭ 41 (-21.15%)
Mutual labels:  docker-image
Kube Aliases
Kubernetes Aliases and Bash Functions
Stars: ✭ 40 (-23.08%)
Mutual labels:  kubectl

Supported tags and respective Dockerfile links

What is kubectl

kubectl is a CLI tool to control a cluster Kubernetes.

Usage

$ docker run --rm wernight/kubectl --help

Note: Entrypoint is set to kubectl so do not type wernight/kubectl kubectl.

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 \
    wernight/kubectl cluster-info
  • -net=host: (optional) allows to connect to a local Kubernetes cluster.
  • --user $UID: (optional) by default runs as random UID 2342, this allows to access your existing ~/.kube if you have one. As you can note, you can run kubectl as any UID/GID.
  • -v XXX:/config: (optional) allows to store its configuration and possibly access existing configuration. Note that /config will always be the directory containing .kube (it's the forced HOME directory). Can be read-only. Alternatively you can mount a Kubernetes service account for example: -v /var/run/secrets/kubernetes.io/serviceaccount:/var/run/secrets/kubernetes.io/serviceaccount:ro.

Usage example 2

Here we use the service-account, so this should work from within a Pod on your cluster as long as you've docker installed (and may be DOCKER_HOST set up properly):

$ docker run \
    -v /var/run/secrets/kubernetes.io/serviceaccount/:/var/run/secrets/kubernetes.io/serviceaccount/:ro \
    wernight/kubectl \
    -s https://kubernetes \
    --token="$(cat /var/run/secrets/kubernetes.io/serviceaccount/token)" \
    --certificate-authority=/var/run/secrets/kubernetes.io/serviceaccount/ca.crt \
    cluster-info

Note: Alternatively to using kube-dns, you can use environment variables set within Kubernetes containers: https://$KUBERNETES_SERVICE_HOST:$KUBERNETES_PORT_443_TCP_PORT.

Alias

You may setup an alias to run this is if you were running kubectl directly. Here is a function POSIX-compatible that work for most shells:

kubectl () {
  docker run --rm -it --user $UID:$GID \
    -v /var/run/secrets/kubernetes.io/serviceaccount:/var/run/secrets/kubernetes.io/serviceaccount:ro \
    -w /code -v "$PWD":/code:ro \
    wernight/kubectl "[email protected]"
}

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 to be installed; only Docker.
  • To avoid kubectl config use-context and similar to affect your build and other projects' builds.

Feedbacks

Suggestions are welcome on our GitHub issue tracker.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].