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

Installation and simple use of K8s

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

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

This article mainly introduces "the installation and simple use of k8s". In the daily operation, I believe many people have doubts about the installation and simple use of k8s. The editor consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful to answer the doubts about the installation and simple use of k8s! Next, please follow the editor to study!

1. Content arrangement and kubernetes introduction

Kubernetes, a tool for content orchestration in cluster environment, is abbreviated to K8s.

K8s is officially provided by Google, and the underlying layer is based on docker, which competes with docker-swarm.

K8s is almost always used in the field of cluster container management.

Duties of K8s

Automate container deployment and replication

Expand or shrink container size at any time

Containers are grouped into Group and provide load balancing between containers

Real-time monitoring, instant fault detection, automatic replacement

Basic concepts of 2.k8s

K8s Master master node

Node node

Service service

Replication Controller replication Controller

Label tag

Container container

Pod K8s minimum control unit

Master

Master is the gateway and hub of the cluster, and its main functions are to expose the API interface, track the health of other servers, schedule load optimally, and orchestrate communication between other components. A single Master node can perform all the functions, but considering the pain point of a single point of failure, multiple Master nodes are usually deployed in production environments to form Cluster.

Node

Node is the working node of K8s, which is responsible for receiving work orders from Master, creating and destroying Pod objects accordingly, and adjusting network rules for reasonable routing and traffic forwarding. In a production environment, there can be N Node nodes.

Pod

Pod is the container of a container, which can contain multiple Container

Is the smallest deployable unit of K8s, and a Pod is a process

Network interconnection of pod internal containers. Each pod has its own virtual ip.

Pod is the deployment of complete applications or modules

Kubelet kube-proxy docker

3. K8s installation

K8s installation way in China

Offline installation using kubeadmin

Use Ali public cloud platform k8s

Through the official warehouse of yum

Installation in binary package form, kubeasz

Install kubeadmin load k8s image # the following command executes yz10 yz20 yz21mkdir / usr/local/k8s-installcd / usr/local/k8s-install4 on three virtual machines. K8s offline deployment 10.211.55.10 yz10 Master node 10.211.55.20 yz20 Node node 10.211.55.21 yz21 Node node # 1. Adjust the time zone timedatectl set-timezone Asia/Shanghai# 2. Turn off the selinux and firewall sed-I _ docker# image download with the corresponding docker# 4. Upload the image to each node mkdir-p / usr/local/k8s-installscp-r kubernetes-1.14 root@yz10:/usr/local/k8s-install# 5. To install docker, remember to configure the accelerator tar-xf docker-ce-18.09.tar.gzcd docker yum localinstall-y * .rpm# 6. Confirm that cgroup is cgroupfsdocker info | grep cgroup# 7. Install kubeadmtar-xf kube114-rpm.tar.gzcd kube114-rpmyum localinstall-y * .rpm# 8. Close exchange swapoff-a # close vi / etc/fstab# comments this line permanently closes # / dev/mapper/centos-swap defaults 0: 9. Configure Bridge cat

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

Internet Technology

Wechat

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

12
Report