Build an open source project 11 kubernetes cluster deployment (2)

Time:2021-1-18

1、 Master node configuration

1. Initialize k8s cluster

  • In order to deal with the problem of blocked network, our domestic network environment can only manually download the relevant images in advance and re tag them
[[email protected] ~]# docker pull mirrorgooglecontainers/kube-apiserver:v1.13.1
[[email protected] ~]# docker pull mirrorgooglecontainers/kube-controller-manager:v1.13.1
[[email protected] ~]# docker pull mirrorgooglecontainers/kube-scheduler:v1.13.1
[[email protected] ~]# docker pull mirrorgooglecontainers/kube-proxy:v1.13.1
[[email protected] ~]# docker pull mirrorgooglecontainers/pause:3.1
[[email protected] ~]# docker pull mirrorgooglecontainers/etcd:3.2.24
[[email protected] ~]# docker pull coredns/coredns:1.2.6
[[email protected] ~]# docker pull registry.cn-shenzhen.aliyuncs.com/cp_m/flannel:v0.10.0-amd64

[[email protected] ~]# docker tag mirrorgooglecontainers/kube-apiserver:v1.13.1 k8s.gcr.io/kube-apiserver:v1.13.1
[[email protected] ~]# docker tag mirrorgooglecontainers/kube-controller-manager:v1.13.1 k8s.gcr.io/kube-controller-manager:v1.13.1
[[email protected] ~]# docker tag mirrorgooglecontainers/kube-scheduler:v1.13.1 k8s.gcr.io/kube-scheduler:v1.13.1
[[email protected] ~]# docker tag mirrorgooglecontainers/kube-proxy:v1.13.1 k8s.gcr.io/kube-proxy:v1.13.1
[[email protected] ~]# docker tag mirrorgooglecontainers/pause:3.1 k8s.gcr.io/pause:3.1
[[email protected] ~]# docker tag mirrorgooglecontainers/etcd:3.2.24 k8s.gcr.io/etcd:3.2.24
[[email protected] ~]# docker tag coredns/coredns:1.2.6 k8s.gcr.io/coredns:1.2.6
[[email protected] ~]# docker tag registry.cn-shenzhen.aliyuncs.com/cp_m/flannel:v0.10.0-amd64 quay.io/coreos/flannel:v0.10.0-amd64

[[email protected] ~]# docker rmi mirrorgooglecontainers/kube-apiserver:v1.13.1
[[email protected] ~]# docker rmi mirrorgooglecontainers/kube-controller-manager:v1.13.1
[[email protected] ~]# docker rmi mirrorgooglecontainers/kube-scheduler:v1.13.1
[[email protected] ~]# docker rmi mirrorgooglecontainers/kube-proxy:v1.13.1
[[email protected] ~]# docker rmi mirrorgooglecontainers/pause:3.1
[[email protected] ~]# docker rmi mirrorgooglecontainers/etcd:3.2.24
[[email protected] ~]# docker rmi coredns/coredns:1.2.6
[[email protected] ~]# docker rmi registry.cn-shenzhen.aliyuncs.com/cp_m/flannel:v0.10.0-amd64
  • Then execute the following command on the master node to initialize the k8s cluster:
[[email protected] ~]# kubeadm init --kubernetes-version=v1.13.1 --apiserver-advertise-address 192.168.1.9 --pod-network-cidr=10.244.0.0/16
  • Kubernets version: used to specify k8s version
  • Apiserver ad vertise address: used to specify which network interface of master is used for communication. If not specified, kubedm will automatically select the interface with default gateway
  • Pod network CIDR: used to specify the network range of pod. This parameter depends on the network scheme used. This paper will use the classic flannel network scheme
    11.1

2、 Source code:

  • Build an open source project 10 kubernetes cluster deployment (middle)
  • https://github.com/ruigege66/Linux/blob/master/ Build an open source project 10 kubernetes cluster deployment (middle)
  • CSDN:https://blog.csdn.net/weixin_44630050
  • Blog Park: https://www.cnblogs.com/ruigege0000/
  • Welcome to WeChat official account: Fourier transform, personal account, for technical exchange only.
    100.0

Recommended Today

Go carbon version 1.2.0 has been released to improve and optimize the multi scenario support for orm

Carbon is a lightweight, semantic and developer friendly golang time processing library, which supports chain call, lunar calendar, Gorm, xorm and other mainstream orm If you think it’s good, please give it to a star github:github.com/golang-module/carbon gitee:gitee.com/go-package/carbon Installation and use //Using GitHub Library go get -u github.com/golang-module/carbon import ( “github.com/golang-module/carbon”) //Using gitee Library go get […]