A little experience of kubeadm initializing kubernetes cluster

Because of the wall, it is not particularly easy to install a kubernetes cluster in China. Here are two methods.

1. Kubernetes still pulls images through docker, so docker can be configured to use VPN. Specifically in 

/etc/systemd/system/docker.service.d

Create http-proxy.conf, https-proxy.conf files in the directory to configure VPN

[Service]
Environment="HTTP_PROXY=http://127.0.0.1:8118" "NO_PROXY=localhost,172.16.0.0/16,127.0.0.1,10.244.0.0/16"

2. By default, kubernetes pulls the files of the gcr.io repository. Before 1.8, the warehouse address can be changed through the following environment variables:

export KUBE_REPO_PREFIX="...."

But in version 1.9 by providing a config.yaml file:

apiVersion: kubeadm.k8s.io/v1alpha1
kind: MasterConfiguration
api:
  advertiseAddress: 192.168.5.71
  bindPort: 6443
etcd:
  image: registry.cn-hangzhou.aliyuncs.com/xxx/etcd-amd64:3.0.17
networking:
  dnsDomain: cluster.local
  subSubnet: 10.244.0.0/16
kubernetesVersion: 1.9.6
imageRepository: registry.cn-hangzhou.aliyuncs.com/xxx
featureGates:
  CoreDNS: false

Then initialize the master in the following way:

kubeadm init --config config.yaml

Of course, the premise of this method is to push all the images required by kubernetes to imageRepository (the specific method can be googled, or see the reference link below). 

3. ELK is not suitable for deployment in kubernetes cluster. It can be deployed in, but after running for a day, the node will hang. Tried it three times.

 

refer to:

1.https://blog.csdn.net/zhuchuangang/article/details/76572157#11-%E6%96%B9%E6%A1%881%E4%BD%BF%E7%94%A8%E9%98%BF%E9%87%8C%E4%BA%91yum%E9%95%9C%E5%83%8F

2. https://blog.csdn.net/u012375924/article/details/78987263

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324454219&siteId=291194637