One   Network error

Wrong presentation :network: failed to set bridge addr: "cni0" already has an IP address differe

terms of settlement :

ip link set cni0 down
ip link delete cni0

 

 

The second namespace cannot be deleted

Reference resources :https://www.cnblogs.com/douh/p/12487577.html

 

1 First run kubectl get ns ingress-nginx -o json > rdbms.json

among ingress-nginx Is the namespace you want to delete , Then open the rdbms.json, Delete the spec Field

 

2 Then open a new window to run kubectl proxy Run one API The agent is local 8081 port

  # kubectl proxy --port=8081

 

3 Execute the command to delete

 

curl -k -H "Content-Type: application/json" -X PUT --data-binary @rdbms.json http://127.0.0.1:8081/api/v1/namespaces/ingress-nginx/finalize

among json The file and namespace should be consistent with the first command .

 

3、 ... and To solve the problem of domestic unable to pull k8s The problem of mirroring

 

 

Reference resources https://www.jianshu.com/p/d42ef0eff63f

 

see kubeadm config Mirror image needed

 

$ kubeadm config images list
k8s.gcr.io/kube-apiserver:v1.13.1
k8s.gcr.io/kube-controller-manager:v1.13.1
k8s.gcr.io/kube-scheduler:v1.13.1
k8s.gcr.io/kube-proxy:v1.13.1
k8s.gcr.io/pause:3.1
k8s.gcr.io/etcd:3.2.24
k8s.gcr.io/coredns:1.2.6

1: transit

First of all, from the Kubernetes At home Docker Mirror image , Then modify the image's tag

sudo docker tag registry.cn-beijing.aliyuncs.com/imcto/kube-controller-manager:v1.13.1 k8s.gcr.io/kube-controller-manager:v1.13.1
sudo docker tag registry.cn-beijing.aliyuncs.com/imcto/kube-apiserver:v1.13.1 k8s.gcr.io/kube-apiserver:v1.13.1
sudo docker tag registry.cn-beijing.aliyuncs.com/imcto/kube-proxy:v1.13.1 k8s.gcr.io/kube-proxy:v1.13.1
sudo docker tag registry.cn-beijing.aliyuncs.com/imcto/kube-scheduler:v1.13.1 k8s.gcr.io/kube-scheduler:v1.13.1
sudo docker tag registry.cn-beijing.aliyuncs.com/imcto/etcd:3.2.24 k8s.gcr.io/etcd:3.2.24
sudo docker tag registry.cn-beijing.aliyuncs.com/imcto/pause:3.1 k8s.gcr.io/pause:3.1
sudo docker tag registry.cn-beijing.aliyuncs.com/imcto/coredns:1.2.6 k8s.gcr.io/coredns:1.2.6

2: Modify the configuration kubeadm.conf

Use kubeadm The configuration file , By specifying... In the configuration file docker Warehouse address , Convenient for rapid deployment of intranet .

Generate configuration files

 

kubeadm config print init-defaults ClusterConfiguration >kubeadm.conf

 

modify kubeadm.conf

Look again kubeadm config Mirror image needed

$ kubeadm config images list --config kubeadm.conf
registry.cn-beijing.aliyuncs.com/imcto/kube-apiserver:v1.13.1
registry.cn-beijing.aliyuncs.com/imcto/kube-controller-manager:v1.13.1
registry.cn-beijing.aliyuncs.com/imcto/kube-scheduler:v1.13.1
registry.cn-beijing.aliyuncs.com/imcto/kube-proxy:v1.13.1
registry.cn-beijing.aliyuncs.com/imcto/pause:3.1
registry.cn-beijing.aliyuncs.com/imcto/etcd:3.2.24
registry.cn-beijing.aliyuncs.com/imcto/coredns:1.2.6

Pull the image and initialize

kubeadm config images pull --config kubeadm.conf
kubeadm init --config kubeadm.conf