一、环境准备

  1、三台CentOS6.7虚拟机
    master:192.168.0.54 注意:主节点最好是2颗cpu,否则在k8s控制平面初始化的时候会报错;
    node1:192.168.0.68
    node2:192.168.0.56
  2、三台主机时间要一致
  3、关闭防火墙
  4、禁用swap分区
    swapoff -a 临时禁用
    vim /etc/fstab 注释掉swap的行,永久禁止
  5、为三台主机添加hosts文件内容,使其能互相通过主机名访问;
    192.168.0.54 k8smaster
    192.168.0.68 k8snode1
    192.168.0.56 kusnode2

6、开启ip_forword转发
               临时生效: echo "1" > /proc/sys/net/ipv4/ip_forward
               永久生效:编辑/etc/rc.d/rc.local,将echo "1" > /proc/sys/net/ipv4/ip_forward加入该文件中;

二、软件安装部分
  1、安装docker-ce和kubernetes的yum源,本次实验用的是华为云的源;
    地址:https://mirrors.huaweicloud.com/
    安装方式华为云都有说明,在这不做描述;
  2、安装软件,master和node都需要安装
    yum install kubelet kubeadm kubectl docker-ce -y
    因为master上的每个组件都是通过pod的方式来运行的,因此master上也需要部署kubelet和docker;
    kubelet和docker不运行为pod,运行为系统守护进程;
三、初始化k8s控制平面
  支持两种初始化方式:指定配置文件和用命令行;本次实验用命令行的方式初始化;初始化官方文档地址:https://kubernetes.io/zh/docs/reference/setup-tools/kubeadm/kubeadm-init/
  1、初始化

  1. kubeadm init --image-repository registry.aliyuncs.com/google_containers --kubernetes-version v1.14.2 --apiserver-advertise-address 192.168.0.54 --apiserver-bind-port 6443 --pod-network-cidr 10.244.0.0/16
  2.   --image-repository 选择用于拉取控制平面镜像的容器仓库。默认值:"k8s.gcr.io",国内环境访问不到,所以指向国内仓库;
  3.   --kubernetes-version 为控制平面选择一个特定的 Kubernetes 版本,(用kubeadm version命令查看版本号)
  4.   --apiserver-advertise-address API 服务器所公布的其正在监听的 IP 地址;
  5.   --apiserver-bind-port API服务器绑定的端口;
  6.   --pod-network-cidr 指明 pod 网络可以使用的 IP 地址段;这里设置10.244.0.0/16,是因为这是flannel网络插件的默认地址段,等会要用到flannel插件,为了不引起不必要的麻烦,先这么指定;

  2、遇到的警告/报错信息

  1. 1)、文件驱动报错
  2.   [WARNING IsDockerSystemdCheck]: detected "cgroupfs" as the Docker cgroup driver. The recommended driver is "systemd". Please follow the guide at https://kubernetes.io/docs/setup/cri/
  3.   原因:默认的文件驱动是cgroupfs,而docker使用的是systemd,因此要将文件驱动修改成systemd
  4.   解决方法:(三台设备都添加一下)
  5.   1vim /etc/docker/daemon.json
        {
  6.     "exec-opts": ["native.cgroupdriver=systemd"]
  7.     }
  8.   2、重启docker服务查看docker状态
  9.     [root@k8smaster ~]# docker info |grep Cgroup
  10.     Cgroup Driver: systemd
  11. 2)、CPU数量少报错
  12.   error execution phase preflight: [preflight] Some fatal errors occurred:
  13.   [ERROR NumCPU]: the number of available CPUs 1 is less than the required 2
  14.   解决方法:添加CPU数量或者核心数(没有测试过增加cpu核心数能否报错,有待测试)
  15. 3)、内核参数报错
  16.   error execution phase preflight: [preflight] Some fatal errors occurred:
      [ERROR FileContent--proc-sys-net-bridge-bridge-nf-call-iptables]: /proc/sys/net/bridge/bridge-nf-call-iptables contents are not set to 1
  17.   解决方法:开启bridge-nf-call-iptables,将0改成1
  18.   1vim /etc/sysctl.d/k8s.conf
  19.     net.bridge.bridge-nf-call-iptables = 1
  20.     net.bridge.bridge-nf-call-ip6tables = 1
  21.   2、重载配置文件
  22.     sysctl -p /etc/sysctl.d/k8s.conf
  23.     sysctl -a |grep bridge #查看更改结果

  3、解决报错信息后初始化完成的状态

  1. [init] Using Kubernetes version: v1.14.2
  2. #自检部分
  3. [preflight] Running pre-flight checks
  4. [WARNING SystemVerification]: this Docker version is not on the list of validated versions: 20.10.6. Latest validated version: 18.09
  5. [preflight] Pulling images required for setting up a Kubernetes cluster
  6. [preflight] This might take a minute or two, depending on the speed of your internet connection
  7. [preflight] You can also perform this action in beforehand using 'kubeadm config images pull'
  8. #启动kubectl
  9. [kubelet-start] Writing kubelet environment file with flags to file "/var/lib/kubelet/kubeadm-flags.env"
  10. [kubelet-start] Writing kubelet configuration to file "/var/lib/kubelet/config.yaml"
  11. [kubelet-start] Activating the kubelet service
  12. #生成自签名的CA证书来为集群中的每个组件建立身份标识;
  13. [certs] Using certificateDir folder "/etc/kubernetes/pki"
  14. [certs] Generating "etcd/ca" certificate and key
  15. [certs] Generating "etcd/peer" certificate and key
  16. [certs] etcd/peer serving cert is signed for DNS names [k8smaster localhost] and IPs [192.168.0.54 127.0.0.1 ::1]
  17. [certs] Generating "apiserver-etcd-client" certificate and key
  18. [certs] Generating "etcd/server" certificate and key
  19. [certs] etcd/server serving cert is signed for DNS names [k8smaster localhost] and IPs [192.168.0.54 127.0.0.1 ::1]
  20. [certs] Generating "etcd/healthcheck-client" certificate and key
  21. [certs] Generating "ca" certificate and key
  22. [certs] Generating "apiserver" certificate and key
  23. [certs] apiserver serving cert is signed for DNS names [k8smaster kubernetes kubernetes.default kubernetes.default.svc kubernetes.default.svc.cluster.local] and IPs [10.96.0.1 192.168.0.54]
  24. [certs] Generating "apiserver-kubelet-client" certificate and key
  25. [certs] Generating "front-proxy-ca" certificate and key
  26. [certs] Generating "front-proxy-client" certificate and key
  27. [certs] Generating "sa" key and public key
  28. #将 kubeconfig 文件写入 /etc/kubernetes/ 目录以便 kubelet、控制器管理器和调度器用来连接到 API 服务器,它们每一个都有自己的身份标识,同时生成一个名为 admin.conf 的独立的 kubeconfig 文件,用于管理操作。
  29. [kubeconfig] Using kubeconfig folder "/etc/kubernetes"
  30. [kubeconfig] Writing "admin.conf" kubeconfig file
  31. [kubeconfig] Writing "kubelet.conf" kubeconfig file
  32. [kubeconfig] Writing "controller-manager.conf" kubeconfig file
  33. [kubeconfig] Writing "scheduler.conf" kubeconfig file
  34. #为 API 服务器、控制器管理器和调度器生成静态 Pod 的清单文件。
  35. [control-plane] Using manifest folder "/etc/kubernetes/manifests"
  36. [control-plane] Creating static Pod manifest for "kube-apiserver"
  37. [control-plane] Creating static Pod manifest for "kube-controller-manager"
  38. [control-plane] Creating static Pod manifest for "kube-scheduler"
  39. [etcd] Creating static Pod manifest for local etcd in "/etc/kubernetes/manifests"
  40. [wait-control-plane] Waiting for the kubelet to boot up the control plane as static Pods from directory "/etc/kubernetes/manifests". This can take up to 4m0s
  41. [apiclient] All control plane components are healthy after 22.005211 seconds
  42. [upload-config] storing the configuration used in ConfigMap "kubeadm-config" in the "kube-system" Namespace
  43. [kubelet] Creating a ConfigMap "kubelet-config-1.14" in namespace kube-system with the configuration for the kubelets in the cluster
  44. [upload-certs] Skipping phase. Please see --experimental-upload-certs
  45. [mark-control-plane] Marking the node k8smaster as control-plane by adding the label "node-role.kubernetes.io/master=''"
  46. [mark-control-plane] Marking the node k8smaster as control-plane by adding the taints [node-role.kubernetes.io/master:NoSchedule]
  47. #生成令牌,将来其他节点可以使用该令牌向控制平面注册自己;
  48. [bootstrap-token] Using token: d9kx53.g4t2ia169zyh9byg
  49. [bootstrap-token] Configuring bootstrap tokens, cluster-info ConfigMap, RBAC Roles
  50. [bootstrap-token] configured RBAC rules to allow Node Bootstrap tokens to post CSRs in order for nodes to get long term certificate credentials
  51. [bootstrap-token] configured RBAC rules to allow the csrapprover controller automatically approve CSRs from a Node Bootstrap Token
  52. [bootstrap-token] configured RBAC rules to allow certificate rotation for all node client certificates in the cluster
  53. [bootstrap-token] creating the "cluster-info" ConfigMap in the "kube-public" namespace
  54. [addons] Applied essential addon: CoreDNS
  55. [addons] Applied essential addon: kube-proxy
  56.  
  57. Your Kubernetes control-plane has initialized successfully!
  58.  
  59. To start using your cluster, you need to run the following as a regular user:
  60. #这几条命令在master主机上,原则上是要用普通用户去执行,测试环境就用root用户执行;
  61. mkdir -p $HOME/.kube
  62. sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
  63. sudo chown $(id -u):$(id -g) $HOME/.kube/config
  64.  
  65. You should now deploy a pod network to the cluster.
  66. Run "kubectl apply -f [podnetwork].yaml" with one of the options listed at:
  67. https://kubernetes.io/docs/concepts/cluster-administration/addons/
  68.  
  69. Then you can join any number of worker nodes by running the following on each as root:
  70. #下面这条命令是要在从节点上执行的,将从节点接入集群中,要记录好,不能丢了,后面要用到;
  71. kubeadm join 192.168.0.54:6443 --token d9kx53.g4t2ia169zyh9byg \
  72. --discovery-token-ca-cert-hash sha256:d8beb243d699f2cb7e5198419887441440d22722ab1cd144121a7f810cc4177a
  1. 此时,在master上执行docker image ls可以看到k8s控制平面所用的镜像;
    [root@k8smaster ~]# docker image ls
  2. REPOSITORY TAG IMAGE ID CREATED SIZE
  3. quay.io/coreos/flannel v0.14.0-rc1 0a1a2818ce59 3 weeks ago 67.9MB
  4. registry.aliyuncs.com/google_containers/kube-proxy v1.14.2 5c24210246bb 24 months ago 82.1MB
  5. registry.aliyuncs.com/google_containers/kube-apiserver v1.14.2 5eeff402b659 24 months ago 210MB
  6. registry.aliyuncs.com/google_containers/kube-controller-manager v1.14.2 8be94bdae139 24 months ago 158MB
  7. registry.aliyuncs.com/google_containers/kube-scheduler v1.14.2 ee18f350636d 24 months ago 81.6MB
  8. registry.aliyuncs.com/google_containers/coredns 1.3.1 eb516548c180 2 years ago 40.3MB
  9. registry.aliyuncs.com/google_containers/etcd 3.3.10 2c4adeb21b4f 2 years ago 258MB
  10. registry.aliyuncs.com/google_containers/pause 3.1 da86e6ba6ca1 3 years ago 742kB
  1. 1、初始化失败时遇到的错误
  2. [kubelet-check] Initial timeout of 40s passed.
  3. error execution phase upload-config/kubelet: Error writing Crisocket information for the control-plane node: timed out waiting for the condition
  4. 解决方法:
  5. swapoff -a && kubeadm reset && systemctl daemon-reload && systemctl restart kubelet && iptables -F && iptables -t nat -F && iptables -t mangle -F && iptables -X
  6. 2、执行kubectl命令时出现的错误,例如执行(kubectl get pods)
  7. Unable to connect to the server: x509: certificate signed by unknown authority (possibly because of "crypto/rsa: verification error" while trying to verify candidate authority certificate "kubernetes")
  8. 解决方法:
  9. cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
  10.  
  11. 以上问题均是原来集群出问题后,重新部署新集群的时候出现的,均是原来的配置没有清除干净导致的;

四、部署flannel网络插件

  部署flannel需要用到kube-flannel.yml文件,可以去github上下载,也有执行命令;地址:https://github.com/flannel-io/flannel

  1. [root@k8smaster ~]# kubectl apply -f https://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel.yml
  2. podsecuritypolicy.policy/psp.flannel.unprivileged created
  3. clusterrole.rbac.authorization.k8s.io/flannel created
  4. clusterrolebinding.rbac.authorization.k8s.io/flannel created
  5. serviceaccount/flannel created
  6. configmap/kube-flannel-cfg created
  7. daemonset.apps/kube-flannel-ds created
  8. [root@k8smaster ~]# kubectl get pods -n kube-system
  9. NAME READY STATUS RESTARTS AGE
  10. coredns-8686dcc4fd-22qbc 1/1 Running 0 4h52m
  11. coredns-8686dcc4fd-flvfx 1/1 Running 0 4h52m
  12. etcd-k8smaster 1/1 Running 0 4h51m
  13. kube-apiserver-k8smaster 1/1 Running 0 4h51m
  14. kube-controller-manager-k8smaster 1/1 Running 0 4h51m
  15. kube-flannel-ds-dbfmf 1/1 Running 0 4h36m
  16. kube-flannel-ds-gd2gw 1/1 Running 0 4h44m
  17. kube-flannel-ds-zsrjj 1/1 Running 0 4h36m
  18. kube-proxy-cr7r4 1/1 Running 0 4h36m
  19. kube-proxy-mnm49 1/1 Running 0 4h52m
  20. kube-proxy-r9g4b 1/1 Running 0 4h36m
  21. kube-scheduler-k8smaster 1/1 Running 0 4h51m

五、添加node节点,每台需要加入节点的node都需要执行

  1. [root@k8snode1 ~]# kubeadm join 192.168.0.54:6443 --token d9kx53.g4t2ia169zyh9byg --discovery-token-ca-cert-hash sha256:d8beb243d699f2cb7e5198419887441440d22722ab1cd144121a7f810cc4177a
  2. [preflight] Running pre-flight checks
  3. [WARNING SystemVerification]: this Docker version is not on the list of validated versions: 20.10.6. Latest validated version: 18.09
  4. [WARNING Hostname]: hostname "k8snode2" could not be reached
  5. [WARNING Hostname]: hostname "k8snode2": lookup k8snode2 on 114.114.114.114:53: no such host
  6. [WARNING Service-Kubelet]: kubelet service is not enabled, please run 'systemctl enable kubelet.service'
  7. [preflight] Reading configuration from the cluster...
  8. [preflight] FYI: You can look at this config file with 'kubectl -n kube-system get cm kubeadm-config -oyaml'
  9. [kubelet-start] Downloading configuration for the kubelet from the "kubelet-config-1.14" ConfigMap in the kube-system namespace
  10. [kubelet-start] Writing kubelet configuration to file "/var/lib/kubelet/config.yaml"
  11. [kubelet-start] Writing kubelet environment file with flags to file "/var/lib/kubelet/kubeadm-flags.env"
  12. [kubelet-start] Activating the kubelet service
  13. [kubelet-start] Waiting for the kubelet to perform the TLS Bootstrap...
  14.  
  15. This node has joined the cluster:
  16. * Certificate signing request was sent to apiserver and a response was received.
  17. * The Kubelet was informed of the new secure connection details.
  18.  
  19. Run 'kubectl get nodes' on the control-plane to see this node join the cluster.
  1. 在主节点上查看状态:
  2. [root@k8smaster ~]# kubectl get nodes -o wide
  3. NAME STATUS ROLES AGE VERSION INTERNAL-IP EXTERNAL-IP OS-IMAGE KERNEL-VERSION CONTAINER-RUNTIME
  4. k8smaster Ready master 5h7m v1.14.2 192.168.0.54 <none> CentOS Linux 7 (Core) 3.10.0-957.el7.x86_64 docker://20.10.6
  5. k8snode1 Ready <none> 4h51m v1.14.2 192.168.0.68 <none> CentOS Linux 7 (Core) 3.10.0-957.el7.x86_64 docker://20.10.6
  6. k8snode2 Ready <none> 4h50m v1.14.2 192.168.0.56 <none> CentOS Linux 7 (Core) 3.10.0-957.el7.x86_64 docker://20.10.6
  1. 添加node节点时遇到的报错信息及解决办法
    [root@k8snode1 ~]# kubeadm join 192.168.0.54:6443 --token d9kx53.g4t2ia169zyh9byg --discovery-token-ca-cert-hash sha256:d8beb243d699f2cb7e5198419887441440d22722ab1cd144121a7f810cc4177a
  2. [preflight] Running pre-flight checks
  3. [WARNING SystemVerification]: this Docker version is not on the list of validated versions: 20.10.6. Latest validated version: 18.09
  4. [WARNING Service-Kubelet]: kubelet service is not enabled, please run 'systemctl enable kubelet.service'
  5. error execution phase preflight: [preflight] Some fatal errors occurred:
  6. [ERROR FileAvailable--etc-kubernetes-kubelet.conf]: /etc/kubernetes/kubelet.conf already exists
  7. [ERROR FileAvailable--etc-kubernetes-bootstrap-kubelet.conf]: /etc/kubernetes/bootstrap-kubelet.conf already exists
  8. [ERROR FileContent--proc-sys-net-ipv4-ip_forward]: /proc/sys/net/ipv4/ip_forward contents are not set to 1
  9. [ERROR Swap]: running with swap on is not supported. Please disable swap
  10. [ERROR FileAvailable--etc-kubernetes-pki-ca.crt]: /etc/kubernetes/pki/ca.crt already exists
  11. [preflight] If you know what you are doing, you can make a check non-fatal with `--ignore-preflight-errors=...`
  12. ##提示文件已经存在(already exists),需要将/etc/kubernetes/下的所有文件删除再初始化
  13. ##############
    需要开启ipv4的转发功能
  14. [root@k8snode1 ~]# kubeadm join 192.168.0.54:6443 --token d9kx53.g4t2ia169zyh9byg --discovery-token-ca-cert-hash sha256:d8beb243d699f2cb7e5198419887441440d22722ab1cd144121a7f810cc4177a
  15. [preflight] Running pre-flight checks
  16. [WARNING SystemVerification]: this Docker version is not on the list of validated versions: 20.10.6. Latest validated version: 18.09
  17. [WARNING Service-Kubelet]: kubelet service is not enabled, please run 'systemctl enable kubelet.service'
  18. error execution phase preflight: [preflight] Some fatal errors occurred:
  19. [ERROR FileContent--proc-sys-net-ipv4-ip_forward]: /proc/sys/net/ipv4/ip_forward contents are not set to 1
  20. [ERROR Swap]: running with swap on is not supported. Please disable swap
  21. [preflight] If you know what you are doing, you can make a check non-fatal with `--ignore-preflight-errors=...`
  22. [root@k8snode1 ~]#
  23. [root@k8snode1 ~]# cat /proc/sys/net/ipv4/ip_forward
  24. 0
  25. [root@k8snode1 ~]# echo 1 > /proc/sys/net/ipv4/ip_forward
  26. [root@k8snode1 ~]# cat /proc/sys/net/ipv4/ip_forward
  27. 1
    ################
    需要关闭swap
  28. [root@k8snode1 ~]# kubeadm join 192.168.0.54:6443 --token d9kx53.g4t2ia169zyh9byg --discovery-token-ca-cert-hash sha256:d8beb243d699f2cb7e5198419887441440d22722ab1cd144121a7f810cc4177a
  29. [preflight] Running pre-flight checks
  30. [WARNING SystemVerification]: this Docker version is not on the list of validated versions: 20.10.6. Latest validated version: 18.09
  31. [WARNING Service-Kubelet]: kubelet service is not enabled, please run 'systemctl enable kubelet.service'
  32. error execution phase preflight: [preflight] Some fatal errors occurred:
  33. [ERROR Swap]: running with swap on is not supported. Please disable swap
  34. [preflight] If you know what you are doing, you can make a check non-fatal with `--ignore-preflight-errors=...`
  35. [root@k8snode1 ~]# free -h
  36. total used free shared buff/cache available
  37. Mem: 1.8G 201M 821M 9.7M 796M 1.4G
  38. Swap: 2.0G 0B 2.0G
  1. token过期的处理办法
  2. [root@k8snode1 ~]# kubeadm join 192.168.0.54:6443 --token d9kx53.g4t2ia169zyh9byg --discovery-token-ca-cert-hash sha256:d8beb243d699f2cb7e5198419887441440d22722ab1cd144121a7f810cc4177a
  3. [preflight] Running pre-flight checks
  4. [WARNING SystemVerification]: this Docker version is not on the list of validated versions: 20.10.6. Latest validated version: 18.09
  5. error execution phase preflight: couldn't validate the identity of the API Server: abort connecting to API servers after timeout of 5m0s
  6. ##此错误表示token过期;
  7. [root@k8smaster ~]# kubeadm token create --print-join-command
  8. kubeadm join 192.168.0.54:6443 --token 1axrit.s0u8ar8v0d218t0r --discovery-token-ca-cert-hash sha256:d8beb243d699f2cb7e5198419887441440d22722ab1cd144121a7f810cc4177a
  9. #用新生成的命令去扩容node节点;
  10. [root@k8smaster ~]# kubeadm token list
  11. TOKEN TTL EXPIRES USAGES DESCRIPTION EXTRA GROUPS
  12. 1axrit.s0u8ar8v0d218t0r 23h 2021-07-01T14:31:46+08:00 authentication,signing <none> system:bootstrappers:kubeadm:default-node-token
  13. ... ...

六、以命令行的方式在集群中跑个容器测试下

  1. 1、先执行docker search nginx,选择一个demo版本的nginx
  2. nginxdemos/hello NGINX webserver that serves a simple page co 68 [OK]
  3. 2、在集群中运行该实例
  4. [root@k8smaster ~]# kubectl create deployment nginx --image="nginxdemos/hello"
  5. deployment.apps/nginx created
  6. [root@k8smaster ~]# kubectl get pods -o wide
  7. NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES
  8. nginx-dcf8cc94c-5snlw 1/1 Running 0 11m 10.244.1.2 k8snode1 <none> <none>
  9. 3、测试
  10. curl -vo /dev/null "10.244.1.2"

七、扩展多个实例

  1. kubectl scale deployment nginx --replicas=3
  2. [root@k8smaster ~]# kubectl get pods -o wide
  3. NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES
  4. nginx-dcf8cc94c-5snlw 1/1 Running 0 4h45m 10.244.1.2 k8snode1 <none> <none>
  5. nginx-dcf8cc94c-mncrp 1/1 Running 0 123m 10.244.2.2 k8snode2 <none> <none>
  6. nginx-dcf8cc94c-wc7wv 1/1 Running 0 123m 10.244.1.3 k8snode1 <none> <none>

八、创建一个service

  由于在扩展多个实例的时候,指定了3个实例,那么就会存在一个问题,当我删掉一个实例的时候,系统会自动创建一个实例,这时候就会分配一个新的ip地址,导致访问旧ip报错,需要连带的替换新的ip地址,为了避免这个问题,创建一个server,类似于负载均衡的作用,在访问的时候访问server的地址,无论后端实例怎么变化也不会影响访问;(kubectl delete pods 资源名称);

  1. [root@k8smaster ~]# kubectl create service clusterip nginx --tcp=80:80
  2. service/nginx created
  3.  
  4. clusterip 指定类型
  5. nginx 实例名称,要跟之前定义的deployment名称保持一致;
  6. [root@k8smaster ~]# kubectl get service
  7. NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
  8. kubernetes ClusterIP 10.96.0.1 <none> 443/TCP 5h26m
  9. nginx ClusterIP 10.108.249.197 <none> 80/TCP 129m
  10.  
  11. 测试:
  12. [root@k8smaster ~]# curl -I "10.108.249.197"
  13. HTTP/1.1 200 OK
  14. Server: nginx/1.13.8
  15. Date: Wed, 12 May 2021 07:55:24 GMT
  16. Content-Type: text/html
  17. Connection: keep-alive
  18. Expires: Wed, 12 May 2021 07:55:23 GMT
  19. Cache-Control: no-cache

用kubeadm简单部署k8s的更多相关文章

  1. 通过kubeadm工具部署k8s集群

    1.概述 kubeadm是一工具箱,通过kubeadm工具,可以快速的创建一个最小的.可用的,并且符合最佳实践的k8s集群. 本文档介绍如何通过kubeadm工具快速部署一个k8s集群. 2.主机规划 ...

  2. kubernetes系列03—kubeadm安装部署K8S集群

    本文收录在容器技术学习系列文章总目录 1.kubernetes安装介绍 1.1 K8S架构图 1.2 K8S搭建安装示意图 1.3 安装kubernetes方法 1.3.1 方法1:使用kubeadm ...

  3. kubeadm简单安装k8s

    One or more machines running a deb/rpm-compatible OS, for example Ubuntu or CentOS 2 GB or more of R ...

  4. 利用kubeadm快速部署k8s

    内外网络互通 [root@k8s-1 ~]# cat /etc/redhat-release CentOS Linux release 7.6.1810 (Core) 配置k8syum仓库,及Dock ...

  5. 通过kubeadm快速部署K8S集群

    kubeadm是官方社区推出的一个用于快速部署kubernetes集群的工具. 这个工具能通过两条指令完成一个kubernetes集群的部署: # 创建一个 Master 节点 $ kubeadm i ...

  6. 使用kubeadm快速部署一套K8S集群

    一.Kubernetes概述 1.1 Kubernetes是什么 Kubernetes是Google在2014年开源的一个容器集群管理系统,Kubernetes简称K8S. K8S用于容器化应用程序的 ...

  7. 【02】Kubernets:使用 kubeadm 部署 K8S 集群

    写在前面的话 通过上一节,知道了 K8S 有 Master / Node 组成,但是具体怎么个组成法,就是这一节具体谈的内容.概念性的东西我们会尽量以实验的形式将其复现. 部署 K8S 集群 互联网常 ...

  8. ubuntu18.04使用kubeadm部署k8s单节点

    实验目的: 体验kubeadm部署k8s服务,全流程体验! 实验环境: ubuntu18.04 联网在线部署 kubeadm 01.系统检查 节点主机名唯一,建议写入/etc/hosts 禁止swap ...

  9. 使用kubeadm部署k8s

    k8s组件 master,node master中包括apiserver,scheduler,controller.etcd apiserver:负责接收用户请求,并且保存至etcd中. schedu ...

随机推荐

  1. mybatis xml 中 trim 多余的符号

    <if test="(mac != null and mac != '') or (roomNo != null and roomNo != '') or (bedNo != null ...

  2. 九种常见UML图(分类+图解)

    九种常见UML图 1.类图 概述 类图(Class Diagram)是面向对象系统建模中最常用和最重要的图,是定义其它图的基础. 类图主要是用来显示系统中的类.接口以及它们之间的静态结构和关系的一种静 ...

  3. 590. N-ary Tree Postorder Traversal - LeetCode

    Question 590. N-ary Tree Postorder Traversal Solution 题目大意:后序遍历一个树 思路: 1)递归 2)迭代 Java实现(递归): public ...

  4. MySQL体系结构与数据类型

    layout: post title: "MySQL体系结构与数据类型" date: 2018-02-26 categories: MySQL tags: MySQL 一.MySQ ...

  5. Seata源码分析(一). AT模式底层实现

    目录 GlobalTransactionScanner 继承AbstractAutoProxyCreator 实现InitializingBean接口 写在最后 以AT为例,我们使用Seata时只需要 ...

  6. 关于『HTML5』:第二弹

    关于『HTML5』:第二弹 建议缩放90%食用 咕咕咕咕咕咕咕!!1 (蒟蒻大鸽子终于更新啦) 自开学以来,经过了「一脸蒙圈的 半期考试」.「二脸蒙圈的 体测」的双重洗礼,我终于有空肝 HTML5 辣 ...

  7. 如何优化PlantUML流程图(时序图)

    这篇文章用来介绍,如何画出好看的流程图. 1. 选择合适的组件 1.1 plantuml官方提供的组件 1.2 加载图片 1.2.1 加载本地图片 1.2.2 加载网络图片 1.2.3 图片资源 2. ...

  8. docker和docker compose安装使用、入门进阶案例

    一.前言 现在可谓是容器化的时代,云原生的袭来,导致go的崛起,作为一名java开发,现在慌得一批.作为知识储备,小编也是一直学关于docker的东西,还有一些持续继承jenkins. 提到docke ...

  9. 【Java面试】@Resource 和 @Autowired 的区别

    Hi,大家好,我是Mic. 一个工作2年的粉丝,问我一个Spring里面的问题. 希望我能从不同的视角去分析,然后碾压面试官. 这个问题是: "@Resource和@Autowired&qu ...

  10. 缤纷多彩的WPF样式框架,开源项目

    下面介绍的四种主流样式框架(最近项目需要,所以了解了一些),在Nuget及Github均可以找到~ 首推样式框架MahApp.Metro 再推样式框架ModernUI 三推样式框架MaterialDe ...