Notes|Notes of Kubernetes
Prepare the local working environment
System Initialization
- Turn off firewall
# temporarily
systemctl stop firewalld
# permanently
systemctl disable firewalld
- Turn off selinux
# temporarily
sed -i 's/enforcing/disabled/' /etc/selinux/config
# permanently
setenforce 0
- Turn off swap
# temporarily
swapoff -a
# permanently (add hash (#) to the beginning of the swap partition line)
vim /etc/fstab
- Configure hostname
hostnamectl set-hostname [hostname]
- Configure static IP
vi /etc/sysconfig/network-scripts/ifcfg-ens32
BOOTPROTO="static" IPADDR=192.168.8.20 PREFIX0=24 GATEWAY=192.168.8.2 DNS1=114.114.114.114 DNS2=8.8.8.8
- Add information of hosts (executed only on master node)
cat >> /etc/hosts << EOF 192.168.8.20 master01 192.168.8.21 worker01 192.168.8.22 worker02 EOF
- 【Notes|Notes of Kubernetes】IPv4 transist to iptables
cat > /etc/sysctl.d/k8s.conf << EOF net.bridge.bridge-nf-call-ip6tables = 1 net.bridge.bridge-nf-call-iptables = 1 EOF
sysctl --system
- Synchronize time across cluster nodes
yum install ntpdate -y
ntpdate time.windows.com
Docker Kubeadm Kubelet
推荐阅读
- federation--kubernetes集群联邦的实现
- 如何在Kubernetes|如何在Kubernetes 里添加自定义的 API 对象(一)
- Kubernetes服务(初学者指南)
- 深入理解Kubernetes的认证与授权机制
- 利用Centos7|利用Centos7 YUM 快速搭建Kubernetes集群
- Kubernetes|Kubernetes stateful set讲解以及一个基于postgreSQL的具体例子
- learning|learning kubernetes by minikube, 3
- Kubernetes的代码规范
- 简单、有效、全面的Kubernetes监控方案
- Spring源码之四prepareBeanFactory()方法