How to Get Started with Kubernetes
First things first – what is Kubernetes? The short version is that Kubernetes is a platform for automating the deployment, scaling, and management of containerized applications. Kubernetes is basically a technology to manage your containers (especially Docker containers, since Kubernetes and Docker work really well together).
It’s a platform that holds your hand as you work through creating and managing your containers. You don’t have to worry about every container’s or instance’s availability; if an instance fails, Kubernetes will auto-detect this and simply recreate the failed instance’s containers on another instance.
This is all easy enough to grasp, right? The tricky part is actually understanding and setting up all the parts and cogs to get the machine up and running. And added to this are the hidden costs of Kubernetes, despite it being an open-source tool, plus various pain points that you will face in a standalone Kubernetes install.
This is why Kubernetes has a reputation of being simple to grasp but difficult to master. Let’s take a quick overview of Kubernetes’ architecture below. If you want more details, read our Kubernetes 101 tutorial. You can also read through this article for a list of terminologies used in Kubernetes.
Kubernetes is set up in a cluster. This is a combination of nodes, which are individual machines within the cluster. Nodes may correspond to physical machines if you run your own hardware, but more likely correspond to virtual machines in a cloud. Nodes are where your application or service is actually deployed. There is a master node that controls and manages the cluster and worker nodes into which you deploy your application’s containers or pods. Nodes run a process called kubelet, which is the primary way work gets assigned to the node.
Now, let’s take a look at some ways you can get started on Kubernetes using some platforms and tools that simplify some of the daunting stuff, especially the setup and management of Kubernetes clusters.
Kubernetes Self-Hosted Solutions
You can set up Kubernetes on your own hardware as a self-hosted solution, and then use some tools that make your life easier on Kubernetes admin side. Let's look at a few of these tools:
The first of the self-hosted solutions is Minikube. This is a tool that creates and runs a single-node Kubernetes cluster in a virtual machine on your computer. Minikube creates a local Kubernetes endpoint that you can use with the kubectl client. Minikube supports most of the typical Kubernetes features such as DNS, dashboards, CNI, and nodeports. Minikube can be installed and run on Linux, Mac, and Windows operating systems, and it also supports multiple hypervisors, such as KVM and Oracle's Virtualbox.
Minikube's main advantage is that it's lightweight enough to run even on your laptop, which makes it an excellent tool for inexpensive hands-on familiarization on Kubernetes. Its main drawback is the same aforementioned single-node limit, which means you cannot get the full Kubernetes experience.
The detailed steps to download and install Minikube can be found in the official Kubernetes Minikube page.
This is yet another self-hosted Kubernetes tool, developed by Ubuntu's main evangelist, Canonical. It is designed to be a fast, and lightweight Kubernetes install isolated from your local environment. This isolation is achieved by packaging all the necessary binaries into a single snap package, using a single command. This will install only the API-server, controller-manager, scheduler, kubelet, CNI, and Kube-proxy.
MicroK8s' single-package installation means it is also easy to install. MicroK8s will not require a virtual machine, and the fact that it's lightweight makes it suitable to run on IoT and edge computing devices.
Kubernetes the Hard Way
If you want to learn all the ins and outs of Kubernetes from complete scratch, you can use this solution on Github. It is designed to be installed on a bare-metal server or instance on the Google Cloud Platform.
According to the creator, "Kubernetes The Hard Way is optimized for learning, which means taking the long route to ensure you understand each task required to bootstrap a Kubernetes cluster."
Kubernetes Hosted / Managed Solutions
Hosted or managed Kubernetes solutions take a lot of the work out of setting up and managing Kubernetes, allowing you to get your cluster up and running much faster. In most cases, you also reap additional benefits, such as access to redundant storage and distributed infrastructure. The tradeoff, compared to self-hosted solutions, is, of course, that you pay a monthly fee for the hosted service.
It's no surprise that the cloud-computing most prominent players offer the biggest hosted Kubernetes solutions. Let's take a look at some of their offerings:
Google Kubernetes Engine (GKE)
Google Kubernetes Engine (GKE) provides a managed environment for deploying, managing, and scaling your containerized applications using Google's massive infrastructure. You can create a free tier account, and you can start a multi-node cluster right away and start working on it.
Kubernetes was initially created by Google engineers for their in-house use and then rolled out to the public as an open-source tool; it thus follows that GKE is one of the most advanced managed platforms available. GKE provides master-node management, integrated logging and monitoring, automatic repair of failed applications, and private container registries. GKE also offers auto-scaling, high availability, and automatic updates.
Amazon Elastic Container Service for Kubernetes (Amazon EKS)
Amazon's EKS is a Kubernetes-optimized extension of its Elastic Container Service (ECS). EKS includes built-in security and encryption and automatic updates. EKS also integrates with other Amazon services such as CloudTrail (auditing), CloudWatch (logging), and IAM (access and role permissions).
It is highly-available and requires only that you provision worker nodes and connect them to provided EKS endpoints.
AWS provides regular useful updates and tools to the K8s codebase to maximize user functionality. However, as with other AWS features, your costs can quickly escalate as you pile on more features.
Microsoft Azure Kubernetes Service (AKS)
Microsoft's AKS offers fully serverless Kubernetes, an integrated continuous integration / continuous delivery (CI/CD) experience, elastic instance provisioning, and enterprise-grade security (though no monitoring of nodes).
Being a Microsoft offering, excellent integration with Windows Server is also a given, for instance, identity and access management is via Active Directory. AKS offers a generous free tier account to start you off.
|Feature/ Service||Amazon EKS||Microsoft AKS||Google GKE|
|Automatic Updates||No||On-demand||Auto + On-demand|
|Pricing (Lowest Tier)||US$0.10/hour per cluster + Standard costs of EC2 instances and other resources||Only pay for the standard VM/ Instance costs, from US$0.12/hour||One zonal cluster free,Then $0.10 per cluster/hour|
|Node health monitoring?||Partial, only available via AWS Autoscaling||No||Yes, node auto-repair enabled by default|
Cloudplex Managed Kubernetes
There is a new level of Kubernetes providers – one that the vendor totally manages, so you don’t even need to worry about the installation and setup or the cloud provider to deploy to.
It is the next level of Kubernetes management, above what the cloud providers like Google, Amazon, and Microsoft offer. Cloudplex is one such provider, in which you can truly get your clusters up and running with literally zero Kubernetes knowledge. Get started with Cloudplex here, and try out some useful hands-on labs here.
Share this news with your followers
1 month ago
3 days, 15 hours ago
1 day, 19 hours ago