Kubernetes is an open source platform that, through a central API server, allows controllers to watch and adjust what’s going on. The server interacts with all the nodes to do basic tasks like start containers and pass along specific configuration items such as the URI to the persistent storage that the container requires.
But Kubernetes can quickly get complicated. So, let’s look at Vanilla Kubernetes — the nickname for a a K8s setup that’s as basic and elementary as it gets.
(See how Splunk supports Kubernetes visibility.)
Vanilla Kubernetes is a K8s environment that runs the most basic components required, but not much more than that. It’s great for beginners and it’s also a great refresh when you’re troubleshooting and scaling these components.
Any core Kubernetes project contains only six individual running pieces:
Let’s look at each.
The kube-apiserver is the core. Everything talks to this service in order to get anything done. The kube-apiserver is stateless by design.
The kube-scheduler matches new requests for pods to the nodes they’ll be run on. This decision can be affected for various reasons including labels, resource requirements, affinity rules, and data location – if local volumes were used, for example.
The kube-controller-manager contains four separate controllers that are bundled together for easier deployments:
The final piece of the master control plane is the cloud-controller-manager. The cloud-controller-manager essentially emulates the features of the controller-manager but knows how to delegate to cloud specific sub-components to request services and nodes from the configured cloud.
Examples of this include:
The kubelet process is one of two components that go on every node. Kubelet is the supervisor on each node that interacts with the container runtime to manage the state of containers based on their specification. The specification can be passed along from a controller or through local manifests, as done on the master control plane nodes for pieces like the kube-apiserver.
The other process that’s on every node, kube-proxy is responsible for ensuring that network traffic is both:
The most common products that support a Kubernetes environment include:
This is the most common base configuration and is even used as part of the official Certified Kubernetes Administrator (CKA) exam.
Kubernetes has an official mini distribution available called minikube. It’s particularly useful when you need to:
minikube can be started and stopped with a single command and contains the core features of Kubernetes in a developer-friendly option. This version is usually run on the developer’s actual workstation.
(There are other community-based single machine distributions — minishift (Red Hat) and microk8s — but those distributions are vendor-specific spins on Kubernetes, so they do drift away from what’s considered a Vanilla install.)
To get started using minikube, there are installation instructions on the Kubernetes.io site for Mac OS X, Windows and Linux. These steps on a Windows desktop demonstrate the ease of getting started:
minikube start --vm-driver=virtualbox
One optional final step is to verify it’s running by listing all pods:
kubectl get po -A
As most Kubernetes clusters running in the wild today are multi-node, there are benefits to knowing the minimum deployment required to setup such a cluster. There are multiple ways to accomplish this feat.
One way is to follow the 14 hands-on labs that are part of Kubernetes the Hard Way by Kelsey Hightower, who is a Staff Developer Advocate at Google and a long-time Kubernetes evangelist.This is designed to run on Google Cloud but walks through all the steps — from nothing to a barebones working cluster and then tearing it down again. This is as close to a Vanilla Kubernetes deployment as you can get.
Another way is to follow the Kubernetes documentation for using kubeadm to check the prerequisites and deploy a cluster. Using the kubeadm method still uses a lot of the same kubectl commands found in Kubernetes the Hard Way. But its value comes through its simplification of numerous routine tasks, like adding and removing nodes and creating authentication tokens.
The complete set of steps are:
At this point you’ll have a Vanilla Kubernetes install!
If you want additional steps to make the cluster useful to developers to function then you’ll want to configure additional components including routing and DNS services which, together, allow for container-to-container communications and service discovery.
With the 100+ certified Kubernetes distributions and hosted offerings available on the market today, there’s no reason for the average organization to ever deploy Vanilla Kubernetes on servers beyond training purposes or for very specific use cases, like developing plugins.
For most purposes, minikube is adequate when just the basic building blocks of Kubernetes are needed. And, as demonstrated above, Kubernetes is never actually pure. As you can see, for reasons like enterprise networking capabilities or monitoring and alerting, Kubernetes can quickly move away from being a Vanilla install.
See an error or have a suggestion? Please let us know by emailing ssg-blogs@splunk.com.
This posting does not necessarily represent Splunk's position, strategies or opinion.
The Splunk platform removes the barriers between data and action, empowering observability, IT and security teams to ensure their organizations are secure, resilient and innovative.
Founded in 2003, Splunk is a global company — with over 7,500 employees, Splunkers have received over 1,020 patents to date and availability in 21 regions around the world — and offers an open, extensible data platform that supports shared data across any environment so that all teams in an organization can get end-to-end visibility, with context, for every interaction and business process. Build a strong data foundation with Splunk.