One of the most essential parts of Kubernetes administration is to keep an eye on resource usage for your master and worker nodes. Checking how much CPU and RAM resources a pod is utilizing can tell you if further scaling needs to be considered in order to deal with the increased load, or if a new configuration or hardware upgrade is in order. In this tutorial, we will look at different ways to check CPU and RAM usage of a Kubernetes pod on a Linux system.
Kubernetes vs Docker, what’s the difference?
Kubernetes and Docker are two names that often get lumped in together. If you are new to containerization technology, you might be wondering what these two technologies do, how they are different from each other, and how both of them fit into the puzzle to tackle a single goal. Both of these tools are important and relevant to system administrators, and are often employed on a Linux system.
Install and Use MicroK8s on Ubuntu
MicroK8s is one of the lightest Kubernetes deployments available, with a very small footprint. This makes it ideal for deployment on edge devices or lightweight machines such as a Raspberry Pi or virtual machine. It can be used in a production environment at a very small scale, but is probably mostly known for its use in development and testing. It is very simple to install and launch a quick Kubernetes cluster with MicroK8s, do your needed testing, and then remove the entire package.
How to Create and Manage a Pod in Kubernetes
A pod is the lowest and most basic container deployment and management unit in Kubernetes. Pods are a logical host for one or more containers that are connected through the localhost interface and share the same network namespace. When using Kubernetes, you will inevitably be creating pods when getting your applications up and running, and then managing your pods to make sure that your hosted applications are running as expected.
How to Create, Manage, and Expose a Service in Kubernetes
A ‘service’ is a way to make an application accessible from the network in Kubernetes. It involves exposing one or multiple network ports that are tied to a containerized application. For example, you can run a containerized web server and expose it over the network to turn it into a service. This then allows incoming client connections, so in this case users could visit the hosted web server.
Control CPU and RAM usage in Kubernetes
Kubernetes is typically used to scale containerized applications across many worker nodes. With more and more applications being deployed into your Kubernetes cluster, managing CPU and memory utilization becomes a crucial issue. In this tutorial, we will look at how to manage CPU and RAM usage in Kubernetes on a Linux system, in order to configure resource limits and ensure that containers are not using more than they are allotted.
How to Setup Minikube for Kubernetes
Minikube is software that allows users to run a Kubernetes cluster of just a single node. It is rather fast to set up and makes for a perfect testing environment for developers to see how their containerized application will run on Kubernetes. It is not meant for production, but rather to test applications and deployment settings to see how they fare before sending them to a production environment.
Choosing a Kubernetes Networking Addon
Deploying a network addon in your Kubernetes cluster will enable communication between different components within the cluster. A network addon can route traffic between nodes, allowing pods in the cluster to send and receive traffic. Load balancing and service discovery are also made easier thanks to networking addons, but each addon comes with its own networking model and configuration. In this tutorial, we will go through a list of networking addons for Kubernetes to help you choose the best one for your needs.
What is Kubernetes used for?
Kubernetes is container orchestration software that allows us to deploy, manage, and scale containerized applications. It has gained a lot of traction over the recent years and has become the most viable way to horizontally and vertically scale applications, even outperforming traditional methods such as virtualization. Kubernetes was originally developed and used by Google, and has since been taken over by the Cloud Native Computing Foundation (CNCF).
How to create a cron job in Kubernetes
The cron scheduler in Kubernetes works very similarly to that of a typical Linux system. This should make it a bit easier for seasoned Linux users that have done their share of crontab editing in the past. However, there is still a specific way to create cron jobs in Kubernetes and a syntax that your YAML file must follow.
kubeadm vs minikube, pros and cons
Once you start looking into creating a Kubernetes cluster to run your containerized applications, one of the first decisions you need to make is what tool to use to run your cluster. Two of the most popular choices for running Kubernetes on a Linux system are kubeadm and minikube. Each one has their pros and cons, and fills a certain niche that the other does not.
How to Create a Kubernetes Cluster
Kubernetes is leading software in container orchestration. Kubernetes works by managing clusters, which is simply a set of hosts meant for running containerized applications. In order to have a Kubernetes cluster, you need a minimum of two nodes – a master node and a worker node. Of course, you can expand the cluster by adding as many worker nodes as you need.