kubeadmin 部署(centos 7)
Posted 会飞の鱼
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了kubeadmin 部署(centos 7)相关的知识,希望对你有一定的参考价值。
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
EOF
setenforce 0
yum install -y kubelet kubeadm kubectl
systemctl enable kubelet && systemctl start kubelet
sed -i "s/cgroup-driver=systemd/cgroup-driver=cgroupfs/g" /etc/systemd/system/kubelet.service.d/10-kubeadm.conf
sed -i ‘s#SELINUX=enforcing#SELINUX=disabled#g‘ /etc/selinux/config
systemctl stop firewalld
systemctl disable firewalld
cat > /etc/sysctl.d/k8s.conf <<EOF
net.bridge.bridge-nf-call-ip6tables = 1
net.bridge.bridge-nf-call-iptables = 1
vm.swappiness = 0
EOF
sysctl -p /etc/sysctl.d/k8s.
yum install -y ebtables socat
关闭sawp分区
swapoff -a
vi /etc/fstab
注释掉swap分区
#/dev/mapper/cl-swap swap swap defaults 0 0
以上是关于kubeadmin 部署(centos 7)的主要内容,如果未能解决你的问题,请参考以下文章
Kubeadmin 搭建K8S 环境 与 Harbor 私有仓库