Hey everybody! In this post, I’d like to talk about Container-centric infrastructure with Kubernetes. This is Part 2 of a series of posts on using installing and using Kubernetes.
If you missed Part 1 where I talk about “Why Containers?”, make sure to check that out.
In this post, I want to give you an overiew of Kubernetes.
A Pod is where an application is deployed, and contains resources specific to an application, such as file storage.
Pods can contain multiple applications, and all applications in a Pod share the same IP address and port space. Think of a Pod as the logical host, and is the atomic unit of deployment and scheduling in a Kubernetes cluster.
A Node is a physical or virtual machine in the cluster, and runs one or more Pods.
Each running Pod with the same definition is called a replica, and a Pod can be instantiated more than once to improve application scalability within the cluster.
Desired state of the cluster
The job of Kubernetes – specifically the master – is the maintain the desired state of the cluster at all times. But what is the desired state?
Let’s start with the documentation.
The desired state is defined as the applications and workloads you want to run, what container images to use, the number of Pod replicas, and other stuff like network and disk resources that your applications need. The master compares the current state of the cluster to the desired state and if they differ, makes any necessary adjustments until the desired state is once again reached.
This is helpful for, say, when an application crashes. The master will detect the application is no longer running, and restart the it. Now the cluster is back to the desired state.
In this post I introduced you to Kubernetes.
Stay tuned for Part 3, where I walk you through installing all of the software you need to run Kubernetes on your computer!
Want to know more?
Be sure to check out other posts in this series:
- Part 1: Why Containers?
Check out this video at IBM developerWorks TV, where I show you everything I covered in Parts 1-5 of this series:
Thanks for reading!