-
Notifications
You must be signed in to change notification settings - Fork 0
/
k8s-install.sh
24 lines (18 loc) · 1.05 KB
/
k8s-install.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
systemctl disable firewalld
systemctl stop firewalld
yum update -y
yum install -y wget net-tools
yum install -y etcd kubernetes
setenforce 0
sed -i "s/OPTIONS='--selinux-enabled --log-driver=journald --signature-verification=false'/OPTIONS='--selinux-enabled=false --insecure-registry gcr.io'/g" /etc/sysconfig/docker
sed -i "s/ServiceAccount,//g" /etc/kubernetes/apiserver
sed -i "s/--service-cluster-ip-range=10.254.0.0\/16/--service-cluster-ip-range=10.254.0.0\/16 --service-node-port-range=1-65535/g" /etc/kubernetes/apiserver
for SERVICES in etcd docker kube-apiserver kube-controller-manager kube-scheduler kubelet kube-proxy
do
systemctl restart $SERVICES && systemctl enable $SERVICES
done
# yum install -y *rhsm*
wget http://mirror.centos.org/centos/7/os/x86_64/Packages/python-rhsm-certificates-1.19.10-1.el7_4.x86_64.rpm
rpm2cpio python-rhsm-certificates-1.19.10-1.el7_4.x86_64.rpm | cpio -iv --to-stdout ./etc/rhsm/ca/redhat-uep.pem | tee /etc/rhsm/ca/redhat-uep.pem
docker pull registry.access.redhat.com/rhel7/pod-infrastructure:latest
kubectl version