Skip to content

k8s-school/k8s-toolbox

master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

K8s-school Logo, expertise et formation Kubernetes

⎈ k8s-toolbox

The ultimate Kubernetes client toolbox, embedded inside a customized container.

What's embedded in that toolbox?

This toolbox offers a convenient set of popular Kubernetes client tools. Its goal is to ease sysadmin, devops and developers life.

  • cfssl: PKI and TLS toolkit https://cfssl.org/
  • clouder: One-liner to create Google Cloud GKE or GCE cluster
  • gnu-parallel: GNU parallel is a shell tool for executing jobs in parallel using one or more computers
  • go-lang: The go programming langage tools
  • gcloud: Google Cloud command-line tool
  • helm, and autocompletion: Helm is the package manager for Kubernetes
  • kubectl and autocompletion: kubectl controls the Kubernetes cluster manager.
  • kubectl aliases: Programmatically generated handy kubectl aliases. https://ahmet.im/blog/kubectl-aliases/
  • kubeval: Validation of kubernetes YAML configurations
  • kustomize: Customization of kubernetes YAML configurations
  • stern: Multi pod and container log tailing for Kubernetes

Installation

Pre-requisites

  • Ubuntu LTS is recommended
  • Internet access
  • sudo access
  • And up and running Kubernetes cluster, and related KUBECONFIG file (see Light speed Kubernetes installation)
  • Install dependencies below:
sudo apt-get install curl docker.io

# then add current user to docker group and restart desktop session
sudo usermod -a -G docker <USER>

Launch

# Create work directory
WORKDIR=$HOME/k8s
mkdir -p $WORKDIR
cd $WORKDIR
curl -lO https://raw.githubusercontent.com/k8s-school/k8s-toolbox/master/toolbox.sh
chmod +x toolbox.sh
./toolbox.sh
# If you have a valid KUBECONFIG file on your host, inside $HOME/.kube/config, command below will work fine:
kubectl get nodes

toolbox launch open a shell inside a Docker container.

NOTE: toolbox container home folder mount $WORKDIR/homefs host directory.

How-to

  • On the host machine, launch an editor or IDE and add Kubernetes applications code and scripts to homefs directory.
  • Inside the k8s-toolbox container, directly run code and scripts.

Google Cloud setup

Pre-requisites

gmail account for regular users must have IAM roles below:

Compute OS Admin Login
Compute OS Login
Kubernetes Engine Developer
Service Account User

See https://cloud.google.com/compute/docs/instances/managing-instance-access#configure_users for additional informations.

Initialize gcloud project

cp /opt/gcp/env-gcp.example.sh $HOME/env-gcp.sh
# Customize $HOME/env-gcp.sh
. $HOME/env-gcp.sh
gcloud auth login
gcloud config set project $PROJECT

Connect to instances

# WARNING: use empty password for ssh key!
# ssh is an alias for  `gcloud compute ssh`
# Replace <X> with your user ID
ssh clus<X>-0

Follow Kubernetes install documentation

Official Kubernetes installation documentation with kubeadm Simple Kubernetes installation procedure with kubeadm

About

The ultimate Kubernetes client toolbox, embedded inside a customized container.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published