(2022版)一套教程搞定k8s安装到实战 | 生产环境关键性配置

Posted COCOgsta

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了(2022版)一套教程搞定k8s安装到实战 | 生产环境关键性配置相关的知识,希望对你有一定的参考价值。

视频来源:B站《(2022版)最新、最全、最详细的Kubernetes(K8s)教程,从K8s安装到实战一套搞定》

一边学习一边整理老师的课程内容及试验笔记,并与大家分享,侵权即删,谢谢支持!

附上汇总贴:(2022版)一套教程搞定k8s安装到实战 | 汇总_COCOgsta的博客-CSDN博客


所有节点配置

vim /etc/docker/daemon.json 

  "registry-mirrors": [
    "https://registry.docker-cn.com",
    "http://hub-mirror.c.163.com",
    "https://docker.mirrors.ustc.edu.cn"
  ],
  "exec-opts":["native.cgroupdriver=systemd"],
  "max-concurrent-downloads": 10,
  "max-concurrent-uploads": 5,
  "log-opts": 
    "max-size": "300m",
    "max-file": "2"
  ,
  "live-restore": true

所有Master节点配置

vi /usr/lib/systemd/system/kube-controller-manager.service 
      --experimental-cluster-signing-duration=876000h0m0s \\

systemctl daemon-reload
systemctl restart kube-controller-manager
systemctl status kube-controller-manager

所有节点配置

vi /etc/systemd/system/kubelet.service.d/10-kubelet.conf
Environment="KUBELET_EXTRA_ARGS=--node-labels=node.kubernetes.io/node='' --tls-cipher-suites=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 --image-pull-progress-deadline=30m"

vi /etc/kubernetes/kubelet-conf.yml
allowedUnsafeSysctls:
  - "net.core*"
  - "net.ipv4.*"
kubeReserved:
  cpu: "10m"
  memory: 10Mi
  ephemeral-storage: 10Mi
systemReserved:
  cpu: "10m"
  memory: 20Mi
  ephemeral-storage: 1Gi

systemctl daemon-reload
systemctl restart kubelet
systemctl status kubelet

以上是关于(2022版)一套教程搞定k8s安装到实战 | 生产环境关键性配置的主要内容,如果未能解决你的问题,请参考以下文章

(2022版)一套教程搞定k8s安装到实战 | InitContainer

(2022版)一套教程搞定k8s安装到实战 | HPA

(2022版)一套教程搞定k8s安装到实战 | DaemonSet

(2022版)一套教程搞定k8s安装到实战 | Volumes

(2022版)一套教程搞定k8s安装到实战 | Cronjob

(2022版)一套教程搞定k8s安装到实战 | Pod