K8S Install and Configuration - Amdingo/wiki GitHub Wiki
- install ntp service
yum install -y ntpsystemctl enable ntpd && systemctl start ntpd && systemctl status ntpd
- add master and minion IPs to
/etc/hostsfor name resolution -
iptablesandfirewalldmodifications - install
etcd,kubernetesanddocker- add repository for latest k8s, docker
vim /etc/yum.repos/virt7-docker-common-release.repo-
[virt7-docker-common-release] name=virt7-docker-common-release baseurl=http://cbs.centos.org/repos/virt7-docker-common-release/x86_64/os/ gpgcheck=0 yum update
- enable repo and install
yum install --enablerepo=virt7-docker-common-release etcd kubernetes docker
- add repository for latest k8s, docker
- configure master controller
-
cd /etc/kubernetes && vim configKUBE_MASTER="--master=http://<masterdns>:8080" # allow for dns resolution instead of IPKUBE_ETCD_SERVERS="--etcd-servers=http://<masterdns>:2379" # allow for dns resolution instead of IP
-
cd /etc/etcd && vim etcd.confETCD_LISTEN_CLIENT_URLS="http://0.0.0.0:2379" # allow for listen on all interfacesETCD_ADVERTISE_CLIENT_URLS="http://0.0.0.0:2379" # allow for listen on all interfaces
-
cd /etc/kubernetes && vim apiserverKUBE_API_ADDRESS="--address=0.0.0.0" # all interfaces- uncomment
KUBE_API_PORT - uncomment
KUBELET_PORT - comment or modify
KUBE_ADMISSION_CONTROLas needed
- start services
systemctl enable etcd kube-apiserver kube-controller-manager kube-schedulersystem ctl start ...
-
- configure minions
-
cd /etc/kubernetes && vim configKUBE_MASTER="--master=http://<dnsmastername>:8080"KUBE_ETCD_SERVERS="--etcd-servers=http://<dnsmastername>:2379"
-
cd /etc/kubernetes && vim kubelet- `KUBELET_ADDRESS="--address=0.0.0.0"
- uncomment
KUBELET_PORTand modify port if needed - `KUBELET_HOSTNAME="--hostname-override="
- `KUBELET_API_SERVER="--api-servers=http://:8080"
- comment or modify
KUBELET_POD_INFRA_CONTAINERunless using rhel containers
- start services
systemctl enable kubeproxy kubelet dockersystemctl start ....
-