Kubernetes Tools

Kuard

Kuard is a small demo application to show your cluster works. Also exposes some info you might want to see.

1
2
kubectl run --restart=Never --image=gcr.io/kuar-demo/kuard-amd64:blue kuard
kubectl port-forward kuard 8080:8080

Open your browser to http://localhost:8080.

Stern

Stern allows you to tail multiple pods on Kubernetes and multiple containers within the pod. Each result is color coded for quicker debugging.

1
brew install stern

Usage

Imagine a build in Jenkins using more than one container in the Pod. You want to tail the logs of all containers... you can with stern.

1
stern maven-

Kube Capacity

Kube Capacity is a simple CLI that provides an overview of the resource requests, limits, and utilization in a Kubernetes cluster.

1
2
brew tap robscott/tap
brew install robscott/tap/kube-capacity
1
kube-capacity
1
2
3
4
NODE              CPU REQUESTS    CPU LIMITS    MEMORY REQUESTS    MEMORY LIMITS
*                 560m (28%)      130m (7%)     572Mi (9%)         770Mi (13%)
example-node-1    220m (22%)      10m (1%)      192Mi (6%)         360Mi (12%)
example-node-2    340m (34%)      120m (12%)    380Mi (13%)        410Mi (14%)
1
kube-capacity --pods
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
NODE              NAMESPACE     POD                   CPU REQUESTS    CPU LIMITS    MEMORY REQUESTS    MEMORY LIMITS
*                 *             *                     560m (28%)      780m (38%)    572Mi (9%)         770Mi (13%)

example-node-1    *             *                     220m (22%)      320m (32%)    192Mi (6%)         360Mi (12%)
example-node-1    kube-system   metrics-server-lwc6z  100m (10%)      200m (20%)    100Mi (3%)         200Mi (7%)
example-node-1    kube-system   coredns-7b5bcb98f8    120m (12%)      120m (12%)    92Mi (3%)          160Mi (5%)

example-node-2    *             *                     340m (34%)      460m (46%)    380Mi (13%)        410Mi (14%)
example-node-2    kube-system   kube-proxy-3ki7       200m (20%)      280m (28%)    210Mi (7%)         210Mi (7%)
example-node-2    tiller        tiller-deploy         140m (14%)      180m (18%)    170Mi (5%)         200Mi (7%)
1
kube-capacity --util
1
2
3
4
NODE              CPU REQUESTS    CPU LIMITS    CPU UTIL    MEMORY REQUESTS    MEMORY LIMITS   MEMORY UTIL
*                 560m (28%)      130m (7%)     40m (2%)    572Mi (9%)         770Mi (13%)     470Mi (8%)
example-node-1    220m (22%)      10m (1%)      10m (1%)    192Mi (6%)         360Mi (12%)     210Mi (7%)
example-node-2    340m (34%)      120m (12%)    30m (3%)    380Mi (13%)        410Mi (14%)     260Mi (9%)
1
kube-capacity --pods --util

Velero

Velero

RBAC Lookup

RBAC Lookup

Install

1
brew install reactiveops/tap/rbac-lookup
1
kubectl krew install rbac-lookup

Lookup user

1
rbac-lookup jvandergriendt -owide

Lookup GKE user

1
rbac-lookup jvandergriendt  --gke

K9S

K9S is a tool that gives you a console UI on your kubernetes cluster/namespace.

Install

1
brew tap derailed/k9s && brew install k9s

Use

By default is looks at a single namespace, and allows you to view elements of the pods running.

1
k9s -n cje

Dive

A tool for exploring a docker image, layer contents, and discovering ways to shrink your Docker image size.

Dive is a tool for analyzing Docker images.

Install

1
2
wget https://github.com/wagoodman/dive/releases/download/v0.7.1/dive_0.7.1_linux_amd64.deb
sudo apt install ./dive_0.7.1_linux_amd64.deb
1
2
curl -OL https://github.com/wagoodman/dive/releases/download/v0.7.1/dive_0.7.1_linux_amd64.rpm
rpm -i dive_0.7.1_linux_amd64.rpm
1
2
brew tap wagoodman/dive
brew install dive
1
go get github.com/wagoodman/dive

Use

1
dive <your-image-tag>
1
dive build -t <some-tag> .
1
CI=true dive <your-image>

Kiali

https://www.kiali.io/

Telepresence

https://www.telepresence.io/