Unleashed series k8s-- rapid deployment k8s cluster

Rapid deployment k8s cluster

1. Install Rancher

Rancher is the industry's only complete open source enterprise-grade container management platform for enterprises to provide users with all the features and landing using container components required in a production environment.

Rancher2.0 based Kubernetes build, use Rancher, DevOps teams can easily test, deploy and manage applications, operation and maintenance teams can deploy, manage and maintain all Kubernetes cluster, regardless of cluster running on top of what infrastructure.

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

2. cluster deployment

2.1 Browser Access

Login password after setting
image

2.2 K8S cluster deployment

  • After logging in, click Add cluster and select Add Host self kubernetes cluster:
    image
  • After logging in, click Add cluster and select Add Host self kubernetes cluster:
    image
  • Select clustering options:
    image
  • Opening the show advanced options:
    image
  • After clicking Next, check the cluster role, where I was deployed in a cluster on one machine, so all check:
    image
  • Copy the below commands, executed on the cluster corresponding to the role of the machine:
sudo docker run -d --privileged --restart=unless-stopped --net=host -v /etc/kubernetes:/etc/kubernetes -v /var/run:/var/run rancher/rancher-agent:v2.3.3 --server https://192.168.9.96 --token hmqpwpbnjls6krdlp97s6v9897cqk9mttsfgdwh26h8k7nmptmhntk --ca-checksum bc32f8f124902e2956b5a46a008f3531d2b28dfae956dbadc55bab2ab3838a87 --etcd --controlplane --worker
  • At this point the cluster is in a ready state to wait some time to build a complete cluster automatically:
    image
  • Allow time for the cluster automatically set up is complete, the state is active cluster to build complete:
    image
  • Click execute kubectl command line:
    image

Reference documents: https://blog.csdn.net/miss1181248983/article/details/87970338

Guess you like

Origin www.cnblogs.com/jiliguo/p/11967034.html