Skip to content

eagleeyetom/k8s-kubectl

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Kubernetes Client

This project is a fork of https://github.com/lachie83/k8s-kubectl and is slightly adapted to do the same thing!

Build GitHub Action Status

Build and Publish kubectl container

Container Details

Static Badge Docker Pulls GitHub last commit Docker Image Size

Get Started

  docker pull eagleeyetom/k8s-kubectl

Supported tags and respective Dockerfile links

Overview

This container provides the Kubernetes client kubectl which can be used to interact with a Kubernetes cluster.

Supported OS/ARCH

  • linux/amd64
  • linux/arm64
  • linux/s390x
  • linux/ppc64le

Massive thanks to barthy1 via PR for contributing this work.

Build

make docker_build

Run

docker run --rm eagleeyetom/k8s-kubectl:``git rev-parse --abbrev-ref HEAD`` --server=http://<server-name>:8080 get pods

Data Container

In order to get kube spec files accessible via the kubectl container please use the following data container that exposes a data volume under /data. It dumps everything under cwd in the data container.

cat ~/bin/mk-data-container 
#!/usr/bin/env sh

WORKDIR="$1"

if [ -z $WORKDIR ]; then
    WORKDIR='.'
fi

cd $WORKDIR
echo "FROM debian:jessie\n\nVOLUME [ '/data' ]\n\nCOPY * /data/" > ./Dockerfile.data-container
docker rm data
docker build -f ./Dockerfile.data-container -t temp/data .
docker run --name data temp/data
rm ./Dockerfile.data-container

Data container with kubectl container

docker run --rm -it --volumes-from data k8s/kubectl:<tag> --server=http://<server-name>:8080 create -f /data/controller.yml

About

Kubernetes client kubectl container

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Dockerfile 61.8%
  • Makefile 38.2%