Blogging Community Kubernetes, minikube ,nodes and pods | In Industry 4.0 - Nodes - Podes

Kubernetes, minikube ,nodes and pods

Minikube

Kubernetes architecture contains Master node and worker nodes. Minikube may be a tool that creates it easy to run Kubernetes locally. Kubernetes architecture contains Master node and worker nodes. Minikube may be a tool that creates it easy to run Kubernetes locally. Kubernetes architecture contains Master node and worker nodes. Minikube may be a tool that creates it easy to run Kubernetes locally. Kubernetes architecture contains Master node and worker nodes. Minikube may be a tool that creates it easy to run Kubernetes locally. Kubernetes architecture contains Master node and worker nodes. Minikube may be a tool that creates it easy to run Kubernetes locally. Minikube runs one node Kubernetes cluster on your laptop to use Kubernetes for practice or development.To start kubernetes cluster using minikube.

Nodes

The group of servers is named a cluster. Kubernetes cluster is consists of the master node and worker nodes. Master node act as a manager. Worker nodes are server or system on which Kubernetes deploy and run our applications. To list down nodes in the Kubernetes cluster. you’ll use kubectl to get no command.

Pods

To run your application on Kubernetes most elementary condition is your application should be containerized. But Kubernetes don’t deploy your app’s container directly as docker does. Instead, Kubernetes wraps our app container or group of containers together. This container wrapper is named a Pod.

Each pod is sort of a separate logical machine with its own IP, hostname, processes, and so on, running one application. All the containers during a pod will appear to be running on an equivalent logical machine. A pod with multiple containers will always run on the same worker node.
Why pods?

Why can we even need pods?

Why can’t we use containers together?

As we aren’t alleged to group multiple processes into one container. We will be needing another higher-level construct that will allow you to bind containers together and manage them as one unit.

Why would we even get to run multiple containers together?

You may have a supporting container together with your main application container. For example a log collection, network proxy, etc

Can’t we put all our processes into one container?

Yes, we will do that, but we do not . We attempt to divide our application into smaller microservices. This makes our apps smaller in size fast to load.

About Pods isolation

A pod of containers allows you to run closely related processes together.
Kubernetes provide these containers with(almost) an equivalent environment as if they were all running during a single container while keeping them somewhat isolated.
“Someone isolated”, is often because you would like containers inside each group to share certain resources, although not all so that they are not fully isolated.
for instance, if your main application’s container writes logs in some file and you would like another application to use some a part of that logfile and make some report.
because of Kubernetes which provides a volume concept by which we will share files directories between containers within the pods.
this is often also one of the rationales why pods having multiple containers doesn’t cover different nodes. They are always co-located on the same worker node.
Some like Dockers, in Kubernetes all containers during a Pod also uses the same IP but different port numbers.
Port conflicts if the same port number allocated only concerns containers within the same pod.
Containers of various pods can never run into port conflict because each pod features a separate port space.

Kubernetes Best Practices

Try to avoid using the latest tag instead use proper tags.
Image pull policy should be used wisely.
If the image pull policy is inf, Not Present and you push an updated image with an equivalent previous tag, the container won’t be updated because it will find the image already present so won’t pull again.
If the image Pull Policy is usually it’ll pull image whenever pod instance will be created, this will hamper the initialization phase of the container.
Using multi-dimensional rather than single-dimensional labels.

-Don’t forget to label all of your resources, not only Pods. Make sure you add multiple labels to every resource, so they are often selected across each individual dimension.

Labels may include things like

The name of the application(or perhaps microservice) the resource belongs to the Application tier(front-end, back-end,and so on)
Environment (development,QA,staging,production,and so on)
Version
etc

Making manageable container images: Only needs files and dependencies to feature in the image file should be added.
Describing each resource through annotations.
to feature additional information to your resources use annotations.
At the smallest amount include annotation describing the resource and with contact information of the author for it.