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

CentOS7.5 uses kubeadm to install and configure Kubernetes1.12 (4)

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

Share

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

In the previous article, we have demonstrated the installation of yum and binary, and in this article we will use the officially recommended kubeadm for installation and deployment.

Kubeadm is a tool provided by Kubernetes to quickly install Kubernetes clusters. With the release of each version of Kubernetes, kubeadm will adjust some practices on cluster configuration. You can learn some new best practices on cluster configuration by experimenting with kubeadm.

1. Prepare all node environments 1. Software version kubernetesv1.12.2CentOS 7.5CentOS Linux release 7.5.1804Dockerv18.06flannel0.10.02, node planning IP role hostname 172.18.8.200k8s mastermaster.wzlinux.com172.18.8.201k8s node01node01.wzlinux.com172.18.8.202k8s node02node02.wzlinux.com

The node and network are planned as follows:

3. System configuration

Turn off the firewall.

Systemctl stop firewalldsystemctl disable firewalld

Configure / etc/hosts and add the following.

172.18.8.200 master.wzlinux.com master172.18.8.201 node01.wzlinux.com node01172.18.8.202 node02.wzlinux.com node02

Close SELinux.

Sed-I's setting SELINUXFORCING'/ etc/selinux/configsetenforce 0

Close swap.

Swapoff-ased-I'sUnip. Etc/fstab swap.pickswap.pickswap.Candle / etc/fstab

Configure forwarding parameters.

Cat 10.244.0.5 UDP 53 Masq 100 UDP 10.96.0.1053 rr-> 10.244.0.4 UDP 53 Masq 100-> 10.244.0.5 UDP 53 Masq 100 Appendix: production component configuration file

All the key plaintext takes up too much space, so I'll use the key content instead.

Admin.confapiVersion: v1clusters cluster-cluster: certificate-authority-data: key content server: https://172.18.8.200:6443 name: kubernetescontexts:- context: cluster: kubernetes-admin name: kubernetes-admin@kubernetescurrent-context: kubernetes-admin@kuberneteskind: Configpreferences: {} users:- name: kubernetes-admin user: client-certificate-data: key content client-key-data: key content controller-manager. ConfapiVersion: v1clusterscluster: certificate-authority-data: key content server: https://172.18.8.200:6443 name: kubernetescontexts:- context: cluster: system:kube-controller-manager name: system:kube-controller-manager@kubernetescurrent-context: system:kube-controller-manager@kuberneteskind: Configpreferences: {} users:- name: system:kube-controller-manager user: client-certificate-data: key content client-key -data: key content kubelet.confapiVersion: v1clusters cluster: certificate-authority-data: key content server: https://172.18.8.200:6443 name: kubernetescontexts:- context: cluster: kubernetes user: system:node:master.wzlinux.com name: system:node:master.wzlinux.com@kubernetescurrent-context: system:node:master.wzlinux.com@kuberneteskind: Configpreferences: {} users:- name: system:node:master.wzlinux.com user : client-certificate-data: key content client-key-data: key content scheduler.confapiVersion: v1clusters scheduler.confapiVersion-cluster: certificate-authority-data: key content server: https://172.18.8.200:6443 name: kubernetescontexts:- context: cluster: kubernetes user: system:kube-scheduler name: system:kube-scheduler@kubernetescurrent-context: system:kube-scheduler@kuberneteskind: Configpreferences: {} users:- name: system:kube- Scheduler user: client-certificate-data: key content client-key-data: key content

Reference document: https://kubernetes.io/docs/setup/independent/install-kubeadm/

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