In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-22 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
Kubernetes 1.14.2 kubeadm deployment of hosts
192.168.100.111 k8s-master
192.168.100.112 k8s-node1
192.168.100.113 k8s-node2
Basic environment systemctl stop firewalldystemctl disable firewalldsed-I's yntpdate ntp.api.bzyum install yntpdate ntp.api.bzyum install yum-utils device-mapper-persistent-data lvm2yum-config-manager-add-repo https://download.docker.com/linux/centos/docker-ce.repoyum install dockersystemctl enable'/ etc/selinux/configsetenforce 0swapoff-a vim / etc/fstab cat / etc/hosts192.168.100.111 k8s-master192.168.100.112 k8s-node1192.168.100.113 k8s-node2yum install ntpdate-yntpdate ntp.api.bzyum install-y yum-utils device-mapper-persistent-data lvm2yum-config-manager Docker & & systemctl start dockervim / etc/sysctl.confnet.bridge.bridge-nf-call-ip6tables = 1net.bridge.bridge-nf-call-iptables = 1net.bridge.bridge-nf-call-arptables = 1sysctl-p deployment cat / etc/yum.repos.d/kubernetes.repo [kubernetes] name=Kubernetesbaseurl= https://mirrors.aliyun.com/kubernetes/yum/repos/kubernetes-el7-x86_64enabled=1gpgcheck=1repo_gpgcheck=1gpgkey=https://mirrors.aliyun.com/kubernetes/yum/doc/yum-key.gpg https://mirrors .aliyun.com / kubernetes/yum/doc/rpm-package-key.gpgEOFyum install-y kubeletkubeadm kubectl-- disableexcludes=kubernetessystemctl enable kubelet & & systemctl start kubeletkubeadm config images list # # query the required version k8s.gcr.io/kube-apiserver:v1.14.2k8s.gcr.io/kube-controller-manager:v1.14.2k8s.gcr.io/kube-scheduler:v1.14.2k8s.gcr.io/kube-proxy:v1.14.2k8s.gcr.io/pause:3.1k8s.gcr.io / etcd:3.3.10k8s.gcr.io/coredns:1.3.1## modifies the corresponding version number K8S_VERSION=v1.14.2ETCD_VERSION=3.3.10DNS_VERSION=1.3.1PAUSE_VERSION=3.1FLANNEL_VERSION=v0.11.0-amd64# basic component docker pull registry.cn-hangzhou.aliyuncs.com/google_containers/kube-apiserver-amd64:$K8S_VERSIONdocker pull registry.cn-hangzhou.aliyuncs.com/google_containers/kube-controller-manager-amd64:$K8S_VERSIONdocker pull Registry.cn-hangzhou.aliyuncs.com/google_containers/kube-scheduler-amd64:$K8S_VERSIONdocker pull registry.cn-hangzhou.aliyuncs.com/google_containers/kube-proxy-amd64:$K8S_VERSIONdocker pull registry.cn-hangzhou.aliyuncs.com/google_containers/etcd-amd64:$ETCD_VERSIONdocker pull registry.cn-hangzhou.aliyuncs.com/google_containers/pause:$PAUSE_VERSIONdocker pull registry.cn-hangzhou.aliyuncs.com/google_containers/coredns:$DNS_VERSION# Network component docker pull quay.io / coreos/flannel:$FLANNEL_VERSION# modify tagdocker tag registry.cn-hangzhou.aliyuncs.com/google_containers/kube-apiserver-amd64:$K8S_VERSION k8s.gcr.io/kube-apiserver:$K8S_VERSIONdocker tag registry.cn-hangzhou.aliyuncs.com/google_containers/kube-controller-manager-amd64:$K8S_VERSION k8s.gcr.io/kube-controller-manager:$K8S_VERSIONdocker tag registry.cn-hangzhou.aliyuncs.com/google_containers/kube-scheduler-amd64:$K8S_VERSION k8s.gcr.io / kube-scheduler:$K8S_VERSIONdocker tag registry.cn-hangzhou.aliyuncs.com/google_containers/kube-proxy-amd64:$K8S_VERSION k8s.gcr.io/kube-proxy:$K8S_VERSIONdocker tag registry.cn-hangzhou.aliyuncs.com/google_containers/etcd-amd64:$ETCD_VERSION k8s.gcr.io/etcd:$ETCD_VERSIONdocker tag registry.cn-hangzhou.aliyuncs.com/google_containers/pause:$PAUSE_VERSION k8s.gcr.io/pause:$PAUSE_VERSIONdocker tag registry.cn-hangzhou.aliyuncs.com/ Google_containers/coredns:$DNS_VERSION k8s.gcr.io/coredns:$DNS_VERSION installs kubeadm init-- kubernetes-version=1.14.2-- pod-network-cidr=10.244.0.0/16-- apiserver-advertise-address=192.168.100.111To start using your cluster You need to run the following as a regular user:### master executes mkdir-p $HOME/.kube sudo cp-I / etc/kubernetes/admin.conf $HOME/.kube/config sudo chown $(id-u): $(id-g) $HOME/.kube/configYou should now deploy a podnetwork to the cluster.Run "kubectl apply-f [podnetwork] .yaml" with one of the options listed at: https://kubernetes.io/docs/concepts/cluster-administration/addons/Then you can join any number Of worker nodes by running the following on each as root:## node node executes kubeadm join 192.168.100.111 discovery-token-ca-cert-hash sha256:abf8f2694f738fcd199aa5bbf99491b0f9248b3750b1df7ba47450bbe9a75f81mkdir 6443-- token ws2hxe.zeq9skej2ppjx4ip\-- discovery-token-ca-cert-hash sha256:abf8f2694f738fcd199aa5bbf99491b0f9248b3750b1df7ba47450bbe9a75f81mkdir-p $HOME/.kubesudo cp-I / etc/kubernetes/admin.conf $HOME/.kube/configsudo chown $(id-u): $(id-g) $HOME/.kube/config## all three execute mkdir-p / etc/cni/net.d/cat
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.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.