kubernetes

A Kubernetes cluster consists of a set of worker machines, called nodes, that run When you deploy Kubernetes, you get a cluster.containerized applications. Every cluster has at least one worker node.The worker node(s) host the Pods that are the components of the application workload. The control plane manages the worker nodes and the Pods in the cluster. In production environments, the control plane usually runs across multiple computers and a cluster usually runs multiple nodes, providing fault-tolerance and high availability.

Read Full blog at http://entradasoft.com/blogs/4-kubernetes-cli-gems

4 CLI Gems of kubernetes

Kube-ps1

A script that lets you add the current Kubernetes context and namespace configured on kubectl to your Bash/Zsh prompt strings. Inspired by several tools used to simplify usage of kubectl. One of the most common mistakes I see people do when interacting with Kubernetes is issuing commands against the wrong cluster or against the wrong namespace. By using kube-ps1, the CLI prompt gets enhanced by displaying the Kubernetes cluster at all times, as well as the namespace on which kubectl operates on.

As kube-ps1 modifies your prompt, you may want to temporarily switch it off when you dont need it. You can issue kubeon and kubeoff to turn it on and off, respectively, for the duration of your session.

Kubens:

Kubens is a utility to switch between Kubernetes namespaces. This script allows you to easily switch between Kubernetes namespaces.

Kubectx:

Kubectx is helpful for multi-cluster installations, where you need to switch between one cluster and another. Rather than type a series of lengthy kubectl command, kubectx works it magic in one short command. It also allows you to alias a lengthy cluster name into an alias.

With kubectx and kubens, in combination with kube-ps1, you now have a prompt that shows you at any time what the target of your next kubectl command is and allows you to quickly switch between contexts and namespaces.

K9s:

K9s is a kubectl like command line tool to interact with your Kubernetes clusters using a terminal UI. K9s provides a terminal UI to interact with your Kubernetes clusters. The aim of this project is to make it easier to navigate, observe and manage your applications. All changes happening to your cluster outside of K9s are monitored and updated in real time so you always have the latest view without having to manually update/ refresh

Navigating k9s happens through shortcut keys. We can always use arrow keys and the enter key to choose items listed. There are quite a few other universal keystrokes to navigate to different views

0: Show all pods in all namespace

d: Describe the selected pod

l: Show logs for the selected pod pod and the list goes on

You can also delete/kill pods, edit YAML representations, obtain shells into pods, and make use of many other features using K9s.

Read more… 4 Kubernetes CLI Gems

Digital Marketing Specialist