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

What are the ways to deploy Kubernetes clusters?

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

Share

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

What are the ways to deploy Kubernetes clusters? To solve this problem, today the editor summarizes this article on Kubernetes cluster deployment, which focuses on deployment methods such as Kubernetes binary deployment.

1. Officials provide three ways of deployment.

Minikube

Minikube is a tool that can quickly run a single point of Kubernetes locally for use only by users trying Kubernetes or daily development.

Deployment address: https://kubernetes.io/docs/setup/minikube/

Kubeadm

Kubeadm is also a tool that provides kubeadm init and kubeadm join for rapid deployment of Kubernetes clusters.

Deployment address: https://kubernetes.io/docs/reference/setup-tools/kubeadm/kubeadm/

Binary packet

It is recommended that you download the released binary package from the official version and deploy each component manually to form a Kubernetes cluster.

Download address: https://github.com/kubernetes/kubernetes/releases

2. Kubernetes architecture diagram

3. Certificates used by the self-signed SSL certificate component etcdca.pem, server.pem, server-key.pemflannelca.pem,server.pem, server-key.pemkube- apiserverca.pem, server.pem, server-key.pemkubeletca.pem, ca-key.pemkube-proxyca.pem, kube-proxy.pem, kube-proxy-key.pemkubectlca.pem, admin.pem, admin-key.pem4. Etcd database cluster deployment

Binary package download address

Https://github.com/etcd-io/etcd/releases

K8s single node deployment idea: the first part

1. Self-signed ETCD certificate

2. ETCD deployment

3. Node install docker

4. Flannel deployment (write subnet to etcd first)

Part II (master)

1. Self-signed APIServer certificate

2. Deploy APIServer components (token,csv)

3. Deploy controller-manager (specify apiserver certificate) and scheduler components

Part III (node)

1. Generate kubeconfig (bootstrap,kubeconfig and kube-proxy.kubeconfig)

2. Deploy kubelet components

3. Deploy kube-proxy components

Part IV (joining the Cluster)

1. Kubectl get csr & & kubectl certificate approve allows you to issue certificates and join the cluster

2. Add a node node

3. View the kubectl get node node

K8s deployment planning: load balancing

Nginx1:192.168.35.104/24

Nginx2:192.168.35.105/24

Master node

Master1:192.168.35.100/24

Master2:192.168.35.103/24

Node node

Node1:192.168.35.101/24

Node2:192.168.35.102/24

The first part 1.1self-signed ETCD certificate 1.1.1, Master operation: [root@localhost ~] # mkdir K8s [root@localhost ~] # cd k8s/ [root@localhost K8s] # ls # # dragged in from the host etcd-cert.sh etcd.sh [root@localhost K8s] # mkdir etcd-cert [root@localhost K8s] # mv etcd-cert.sh etcd-cert the following is the content of the etcd.sh script vim etcd.shengxinxinxambash # example:. / etcd.sh etcd01 192.168.1.10 etcd02= Bash Etcd03= https://192.168.1.12:2380ETCD_NAME=$1ETCD_IP=$2ETCD_CLUSTER=$3WORK_DIR=/opt/etcdcat

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