Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

The structure and concept of k8s cluster

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly explains "the structure and concept of k8s cluster". Interested friends may wish to take a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn the structure and concept of K8s cluster.

K8s cluster is generally composed of master node, node node, etcd database and independent storage.

In the total production environment, there are at least 3 master nodes, and etcd can be installed on a separate server or on a master node. Etcd is the database that holds the state of the cluster.

The minimum logical unit for K8s scheduling is pod, while pod consists of one or more business containers and a root container (Pause container). There are mainly four types of pod:

1. System pod in kube-system space

2. Pod created manually on master

3. Pod automatically created by each controller on master

4. Static pod created manually on node that is not managed by master

The main components on the master node are:

1. Kube-apiserver: the entry point for cluster control, which provides HTTP REST services

2. Automation control center of all resource objects in kube-controller-manager:Kubernetes cluster

3. Kube-scheduler: responsible for Pod scheduling

4. Etcd database (can also be installed on a separate server)

The main components on the node node are:

1. Kubelet: responsible for the creation, startup, monitoring, restart and destruction of Pod, while cooperating with Master nodes

2. Kube-proxy: achieve Kubernetes Service communication and load balancing

3. Container engine (Container runtime) such as docker

The plug-ins that all nodes need to install are:

1. Domain name resolution plug-in coredns

2. Network plug-ins such as flannel

There are several controllers managed by Controller Manager:

1. Pod controller

2. Node controller

3. Namespace controller

4. Service controller

5. Endpoint controller

6. Resourcequota controller, etc.

Pod controller classification:

1 、 ReplicationController

2 、 ReplicaSet

3 、 Deployment

4 、 StatefulSet

5 、 DaemonSet

6 、 Job,Cronjob

7 、 HPA

The resource objects in k8s include:

1. Workload class: pod and pod controller

2. Discovery and load balancing class: service,endpoint,ingress

3. Configuration and storage class: volume,configmap

4. Cluster class: namespace,node,role,clusterrole,rolebinding,clusterrolebinding

5. Metadata class: HPA,pod template, limitrange

There are three layers of network in K8s:

1. Node network

2. Service network (cluster network)

3. Pod network

Communication in K8s:

1. Communication between containers in the same pod

2. Communication between pod

3. Communication between pod and service

4. Communication between external client and pod

At this point, I believe you have a deeper understanding of the "structure and concept of K8s cluster". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report