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

K3s how to quickly build K8s cluster environment

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

Share

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

This article introduces the relevant knowledge of "how to quickly build a K8s cluster environment in K3s". Many people will encounter this dilemma in the operation of actual cases, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

There are many ways to build K8s. If you are in an intranet environment and want to occupy less server resources or an edge system (such as ARM system), it is highly recommended that you use K3s for installation.

Catalogue

Step 1 modify the hostname to keep it unique

Step 2 install docker

Step 3 install the master node

Step 4 install the worker node to join the cluster

Step 5 View the cluster

Step 6 deploy k8s dashboard dashboard

Brief introduction of K3s

K3s architecture

Official documents in Chinese

Three servers quickly set up k8s cluster

Installation instructions

Brief introduction of K3s

Lightweight Kubernetes. Easy to install, only half the memory, all the binaries are less than 100MB

K3s is a fully Kubernetes-compliant distribution with the following enhancements.

K3s architecture

It is basically the architecture of K8s. K3s Server node corresponds to k8sMaster node and Agent node corresponds to Worker node.

Official documents in Chinese

Https://docs.rancher.cn/docs/k3s/_index/

Three servers quickly set up k8s cluster

Server environment:

3 Ali Cloud ECS CVMs

ECS is in the same region and under the same private network.

Operating system Linux Centos8

Hardware configuration 2-core 8G

Using docker as the container of K3s

Installation instructions

This cluster is not highly available to master nodes, mainly to quickly experience the K8s cluster environment.

This time docker is used as the container of K3s.

K3s uses container by default, and the two commands compare the table:

Idcontainerd Command docker Command Note 1ctr image lsdocker images get image information 2ctr image pull nginxdocker pull nginxpull a nginx image3ctr image tag nginx nginx-testdocker tag nginx nginx-testtag a nginx image4ctr image push nginx-testdocker push nginx-testpush nginx-test image5ctr image pull nginxdocker pull nginxpull a nginx image6ctr image import nginx.tardocker load > / etc/hosts

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