
The article briefly discusses third-party Open Source utilities for Kubernetes that implement various features and are designed to help with daily work. 4 of them are taken from an English-language material and help in: automatic updating of configurations, tracking the load on containers / subnets / nodes, context switching, creating DIND clusters (Docker in Docker). The rest are found on GitHub and presented in a short list.
Kube-applier
- Github
- License: Apache License 2.0.
- Requirements: Go 1.7+, Docker 1.10+, Kubernetes 1.2.x — 1.4.x (with support for 1.5 and 1.6 there is a temporary problem ).
The online storage service Box opens the source code of some of the tools used for deployment with Kubernetes. In April
, one of these projects
was presented - kube-applier.
')
Kube-applier is launched as a service in Kubernetes, takes from the Git-repository a set of configuration files for the Kubernetes cluster and consistently applies them to subsets in the cluster. Whenever these changes appear in the files, they are automatically taken from the repository and applied to the corresponding sub-fields.
(Configuration example for kube-applier see here .)Changes can also be applied on schedule or on request. Kube-applier logs its actions every time it starts and offers metrics for monitoring with Prometheus.

Kubetop
- Github
- License: MIT License.
- Requirements: Python, Pip / Pipsi.
Kubetop is a console utility for displaying a list of all running nodes, all hearths on these nodes and all containers in these hearths, as well as the consumption of processor resources and RAM for each of them - similar to the classic Unix top utility. This tool cannot be recommended as a full replacement for detailed logging / reporting, since the information they provide is very limited, but sometimes it is precisely this brevity and a quick look at the status of the Kubernetes cluster can be very useful.
In fact, the
kubectl
in Kubernetes has a similar function, but Kubetop has a clearer conclusion:
kubetop - 13:02:57 Node 0 CPU% 9.80 MEM% 57.97 ( 2 GiB/ 4 GiB) POD% 7.27 ( 8/110) Ready Node 1 CPU% 21.20 MEM% 59.36 ( 2 GiB/ 4 GiB) POD% 3.64 ( 4/110) Ready Node 2 CPU% 99.90 MEM% 58.11 ( 2 GiB/ 4 GiB) POD% 7.27 ( 8/110) Ready Pods: 20 total 0 running 0 terminating 0 pending POD (CONTAINER) %CPU MEM %MEM s4-infrastructure-3073578190-2k2vw 75.5 782.05 MiB 20.76 (subscription-converger) 72.7 459.11 MiB (grid-router) 2.7 98.07 MiB (web) 0.1 67.61 MiB (subscription-manager) 0.0 91.62 MiB (foolscap-log-gatherer) 0.0 21.98 MiB (flapp) 0.0 21.46 MiB (wormhole-relay) 0.0 22.19 MiB
Kubectx and K8senv
To refer to clusters with different configurations, Kubernetes uses the concept of context. Switching between them with the native console utility
kubectl
is not very convenient, resulting in third-party methods for solving this problem.
Kubectx - Bash script that allows you to assign short names to Kubernetes contexts and switch between them. And if you pass a hyphen as an argument, it switches to the previous context. The script also supports the automatic addition of names by pressing the <Tab>.
$ kubectx minikube Switched to context "minikube". $ kubectx - Switched to context "oregon". $ kubectx - Switched to context "minikube". $ kubectx dublin=gke_ahmetb_europe-west1-b_dublin Context "dublin" set. Aliased "gke_ahmetb_europe-west1-b_dublin" as "dublin".
Another context switching utility, k8senv, is a bit less functional.
kubeadm-dind-cluster
- Github
- License: Apache License 2.0.
- Requirements: Docker 1.12+, Kubernetes 1.4.x, 1.5.x, 1.6.x.
As you know, for a test run of a local installation of Kubernetes with one node, there is a good ready-made solution from the project itself -
Minikube . And for those who want to deploy clusters from many nodes for experimenting or developing Kubernetes itself, there is a product from Mirantis - kubeadm-dind-cluster (KDC).
The KDC uses
kubeadm
to start a cluster created from Docker containers instead of virtual machines
(for this, use DIND, Docker in Docker - approx. Transl. ) . The selected implementation allows you to quickly restart the cluster, which is especially valuable if you need to quickly see the result of changes in the code when developing Kubernetes itself. You can also use KDC in continuous integration environments. Works in GNU / Linux, Mac OS and Windows, does not require Go installation, since uses doberized Kubernetes.
An example of working with KDC based on Kubernetes 1.6:
$ wget https://cdn.rawgit.com/Mirantis/kubeadm-dind-cluster/master/fixed/dind-cluster-v1.6.sh $ chmod +x dind-cluster-v1.6.sh $
Other utilities
The list of other auxiliary utilities for Kubernetes, available on GitHub and not mentioned in the original article:
- kube-monkey - kills pods randomly, by analogy with Chaos Monkey from Netflix (there is an alternative to chaoskube );
- Kubediff - shows the difference between the Kubernetes configurations: currently running and described in the config (it can both work as a service that periodically downloads the latest configuration from Git and compares it with the current one, supports sending notifications to Slack chat, has a web interface);
- ktmpl - handles parameterized Kubernetes manifest templates;
- kube-lint - validates the configurations and resources of Kubernetes for compliance with the rules defined by you;
- kenv - inserts environment variables into the resource description;
- konfd - manages application configurations using Kubernetes secrets, configmaps, and Go templates;
- kubernetes-secret-manager - manages secrets using Vault by Hashicorp;
- k8sec - also helps to manage Kubernetes secrets in the console;
- kube-ops-view - vividly shows the current status of all the pods and nodes of the cluster using a dashboard written in JavaScript;

- kubewatch - monitors all events in the Kubernetes cluster and reports them on Slack chat;
- kube-slack - reports to Slack about errors in the work of the hearth;
- k8stail - implements log output as
tail -f
for all pods of a cluster.

PS from translator
Read also in our blog: