centos7 --kubeadm安裝


One or more machines running one of:
Ubuntu 16.04+ Debian 9 CentOS 7 RHEL 7 Fedora 25/26 (best-effort) HypriotOS v1.0.1+
Container Linux (tested with 1800.6.0)
內存:2 GB or more of RAM per machine (any less will leave little room for your apps)
cpu:2 CPUs or more
網絡:Full network connectivity between all machines in the cluster (public or private network is fine)
獨立:Unique hostname, MAC address, and product_uuid for every node. ip link or ifconfig -a ,cat /sys/class/dmi/id/product_uuid
端口開放:Certain ports are open on your machines. See here for more details.
swap:Swap disabled. You MUST disable swap in order for the kubelet to work properly

一、基礎配置

#添加google repo源,要翻牆。
cat <<EOF > /etc/yum.repos.d/kubernetes.repo [kubernetes] name=Kubernetes baseurl=https://packages.cloud.google.com/yum/repos/kubernetes-el7-x86_64 enabled=1 gpgcheck=1 repo_gpgcheck=1 gpgkey=https://packages.cloud.google.com/yum/doc/yum-key.gpg https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg exclude=kube* EOF #關閉selinux setenforce 0 sed -i 's/^SELINUX=enforcing$/SELINUX=permissive/' /etc/selinux/config systemctl enable --now kubelet

 

二、安裝kubelt  kubeadm kubectl

yum install -y kubelet kubeadm kubectl --disableexcludes=kubernetes

 

三、啟動

systemctl enable --now kubelet

 

其他

#如果防火牆啟動的話,可能需要開啟下面:
cat <<EOF > /etc/sysctl.d/k8s.conf net.bridge.bridge-nf-call-ip6tables = 1 net.bridge.bridge-nf-call-iptables = 1 EOF sysctl --system

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM