k8s学习手册 更新中......
目录
01kubernetes基础概念
02kubeadm 初始化kubernetes集群
03kubernetes应用快速入门
04 kubernetes资源清单定义
05kubernetes Pod控制器应用进阶
06kubernetes Pod控制器
07kubernetes Pod控制器
08kubernetes Pod控制器
09kubernetes Service资源
10kubernetes Ingress及ingress Controller
11存储卷
12kubernetes pv,pvc,configuremap 和secret
13kubernetes statefulset控制器
14kubernetes 认证以及serviceaccount
15kubernetes RBAC
16kubernetes dashboard认证及分级授权
17配置网络插件flannel
18基于canel的网络策略
19调度器、预选策略及优选函数
20kubernetes高级调度方式
21容器资源需求、资源限制及HeapSter
22资源指标API及自定义指标API
23helm入门
24创建自定义Chart及部署efk日志系统
01kubernetes基础概念
学习路线
02kubeadm 初始化kubernetes集群
k8s集群部署
yum install -y yum-utils device-mapper-persistent-data lvm2
yum-config-manager --add-repo https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
yum install -y docker-ce-18.09.8-3.el7 docker-ce-cli containerd.io
mkdir -p /etc/docker
tee /etc/docker/daemon.json <<-'EOF'
{
"registry-mirrors": ["https://iuj3d0uh.mirror.aliyuncs.com"],
"insecure-registries": ["192.168.0.110"],
"graph": "/data/docker",
"exec-opts": ["native.cgroupdriver=systemd"],
"log-driver": "json-file",
"log-opts": {
"max-size": "100m" },
"storage-driver": "overlay2"
}
EOF
systemctl daemon-reload
systemctl enable docker
systemctl restart docker
yum install -y ipvsadm ipset
cat > /etc/sysconfig/modules/ipvs.modules <<EOF modprobe -- ip_vs
modprobe -- ip_vs_rr
modprobe -- ip_vs_wrr
modprobe -- ip_vs_sh
modprobe -- nf_conntrack_ipv4
EOF
chmod 755 /etc/sysconfig/modules/ipvs.modules && bash /etc/sysconfig/modules/ipvs.modules && lsmod | grep -e ip_
cat <<EOF > /etc/yum.repos.d/kubernetes.repo
[kubernetes]
name=Kubernetes
baseurl=https://mirrors.aliyun.com/kubernetes/yum/repos/kubernetes-el7-x86_64/
enabled=1
gpgcheck=1
repo_gpgcheck=1
gpgkey=https://mirrors.aliyun.com/kubernetes/yum/doc/yum-key.gpg https://mirrors.aliyun.com/kubernetes/yum/doc/rpm-package-key.gpg
EOF
setenforce 0
yum install -y kubelet kubeadm kubectl
systemctl enable kubelet && systemctl start kubelet
cat <<EOF > /etc/sysctl.d/k8s.conf
net.bridge.bridge-nf-call-ip6tables = 1
net.bridge.bridge-nf-call-iptables = 1
net.ipv4.ip_forward = 1
vm.swappiness = 0
EOF
sysctl --system
k8s初始化
kubeadm init --kubernetes-version=v1.16.0 --pod-network-cidr=10.244.0.0/16 --service-cidr=10.96.0.0/12 --image-repository registry.aliyuncs.com/google_containers
安装网络插件flannel
kubectl apply -f https://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel.yml
# https://github.com/coreos/flannel
其它网络插件后续有更新
03kubernetes应用快速入门
04 kubernetes资源清单定义
05kubernetes Pod控制器应用进阶
06kubernetes Pod控制器
07kubernetes Pod控制器
08kubernetes Pod控制器
09kubernetes Service资源
10kubernetes Ingress及ingress Controller
traefik
[](https://img2018.cnblogs.com/blog/1770158/201909/1770158-20190929212452588-1619430628.png