Get the App
SLTechnology News&Howtos  ›  Servers  › 

Kubernetes cluster: binary deployment single etcd, multi-node cluster

Shulou Source: shulou.com Published: 2022-06-02 10:24:46 10月01日 Update

Kubernetes cluster deployment

1. Three official deployment methods

Environmental planning of 2.Kubernetes platform

3. Self-signed SSL certificate

4.Etcd database cluster deployment

5.Node install Docker

6.Flannel Container Cluster Network deployment

7. Deploy Master components

8. Deploy Node components

9. Deploy a test example

10. Deploy Web UI (Dashboard)

11. Deploy DNS parsing service (CoreDNS) within the cluster

Three official deployment methods: minikube:

Minikube is a tool that allows you to quickly run a single point of Kubernetes locally, only for users who try 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 package:

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

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

To solve the problem of service discovery, we need the following three pillars, one of which is indispensable. A highly consistent, highly available service storage directory

Etcd based on Ralf algorithm is inherently such a highly consistent and highly available service storage directory.

two。 Mechanism for the health status of one-second registration services and health services

Users can register the service in etcdz, configure key TTL for the registered service, and keep the heartbeat of the service regularly to achieve the effect of monitoring health status.

3. A mechanism for finding and connecting services

The service industry registered under the theme specified by etcd can be found under the corresponding topic. In order to ensure connectivity, we can deploy a proxy mode etcd on each service machine, thus ensuring that the services accessing the etcd cluster can be connected to each other.

Demo: binary deployment of multi-node, single etcd cluster

Environmental preparation: related software packages and documentation:

Link: https://pan.baidu.com/s/1nn67GDs8BD6sQTeKH4Ii4w

Extraction code: vx7m

Mester:7-3 192.168.18.128 kube-apiserver kube-controller-manager kube-scheduler etcd

Node1:7-4 192.168.18.148 kubelet kube-proxy docekr flannel etcd

Node2:7-5 192.168.18.145 kubelet kube-proxy docekr flannel etcd

Mester7-3: [root@master ~] # mkdir k8s [root@master ~] # cd k8s/ [root@master k8s] # mkdir etcd-cert [root@master k8s] # mv etcd-cert.sh etcd-cert [root@master k8s] # lsetcd-cert etcd.sh [root@master k8s] # vim cfssl.shcurl-L https://pkg.cfssl.org/R1.2/cfssl_linux-amd64-o / usr/local/bin/cfsslcurl-L https://pkg.cfssl.org/R1.2 / cfssljson_linux-amd64-o / usr/local/bin/cfssljsoncurl-L https://pkg.cfssl.org/R1.2/cfssl-certinfo_linux-amd64-o / usr/local/bin/cfssl-certinfochmod + x / usr/local/bin/cfssl / usr/local/bin/cfssljson / usr/local/bin/cfssl-certinfo [root@master K8s] # bash cfssl.sh [root@master K8s] # ls / usr/local/bin/cfssl cfssl-certinfo cfssljson` define CA certificate `cat > ca-config.json

Tags: Service cluster status certificate node health binary address official copy component consistency consistency subject tool method mechanism environment user directory Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno macOS Shulou Technology Shulou Tech Info Shulou Information Redmi