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

Steps for rancher to install a kubernetes cluster

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

Share

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

This article is to share with you rancher installation kubernetes cluster detailed installation tutorial, I believe that most people do not know how to install, in order to let you learn, to give you a summary of the following content, needless to say, let's read on.

1. Installation

Yum install docker-y # install docker

Systemctl enable docker # Boot starts automatically

Docker run-d-- restart=unless-stopped-p 80:80-p 443 rancher/rancher:stable

# pull rancher creation

two。 Log in and create a cluster

Account password admin admin

Create a cluster and add master nodes

# create and enable name for the cluster

# master node needs to check Etcd,contorl, and then copy the following code to the host of master to run.

3 add node node

# clusters created in the first selection

# Select a host and edit the cluster

# move to the last copy code and run it on the node node. Of course, the docker of the node node should be installed and started.

# it is recommended to go to the nodo node first and execute docker pull rancher/rancher-agent:v2.3.3 to pull down the image in advance.

# after installation, you can find that rancher can detect the node node.

4. Create pod

# Select cluster first, select namespace, and select deployment service in workload

# setting the name image path, etc., to complete the deployment is much more convenient than writing the yaml file

5. Install kubectl

Curl-LO https://storage.googleapis.com/kubernetes-release/release/v1.16.3/bin/linux/amd64/kubectl

# download the kubectl script, pay attention to the corresponding version. If you want to download 1.17, change the 1.16.3 above.

Chmod + x kubectl # give permission to run

Mv kubectl / usr/local/bin/kubectl # move to the running directory

[root@cs25] # mkdir ~ / .kube

[root@cs25] # cd ~ / .kube/

[root@cs25 .kube] # vim config

# go to rancher and copy out the configuration file of kubectl and paste it into the file above

# Test and view the node node

The above can be used, but the command cannot be completed. Set the completion function below.

Echo 'source

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