Kubernetes绒布etcd不更新 [英] Kubernetes flannel etcd not upading

查看:126
本文介绍了Kubernetes绒布etcd不更新的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在centos 7、3节点集群中配置了kubernetes 1.6.2.当我部署Pod时,我会获得每个Pod的uniq ip地址.我也看到网络接口创建了docker0,flannel.1和cni0.但是当我查询etcd时,我没有看到任何值.

I am have configured kubernetes 1.6.2 in centos 7, 3 node cluster. when I deploy the pods I get the uniq ip address for each pod. also I see network ineterface created docker0, flannel.1 and cni0 created. But when I query etcd I didn't see any value.

 # kubectl get pods -o wide
NAME                          READY     STATUS    RESTARTS   AGE       IP           NODE
node-hello-3045857680-fg1b4   1/1       Running   0          1h        10.244.1.3   node-01
node-hello-3045857680-q84jt   1/1       Running   0          1h        10.244.2.4   node-02
node-hello-3045857680-sbcz0   1/1       Running   0          2h        10.244.2.3   node-02
node-hello-3045857680-tmjgr   1/1       Running   0          1h        10.244.2.5   node-02
node-hello-3045857680-wwhn4   1/1       Running   0          2h        10.244.1.2   node-01

我将它们部署到yaml文件中.

i deployed these to yaml files.

kubectl create -f https://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel-rbac.yml
kubectl create -f https://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel.yml


# etcdctl get  /atomic.io/network/config
{"Network":"10.20.0.0/16"}


# etcdctl ls /  --recursive
/atomic.io
/atomic.io/network
/atomic.io/network/config

Api进程配置为与etcd对话.

Api process configured to talk to etcd.

root      4597  4571  1 20:52 ?        00:02:29 kube-apiserver --admission-control=NamespaceLifecycle,LimitRanger,ServiceAccount,PersistentVolumeLabel,DefaultStorageClass,ResourceQuota,DefaultTolerationSeconds --requestheader-username-headers=X-Remote-User --requestheader-extra-headers-prefix=X-Remote-Extra- --requestheader-allowed-names=front-proxy-client --service-cluster-ip-range=10.96.0.0/12 --client-ca-file=/etc/kubernetes/pki/ca.crt --kubelet-client-certificate=/etc/kubernetes/pki/apiserver-kubelet-client.crt --insecure-port=0 --storage-backend=etcd3 --kubelet-preferred-address-types=InternalIP,ExternalIP,Hostname --service-account-key-file=/etc/kubernetes/pki/sa.pub --requestheader-client-ca-file=/etc/kubernetes/pki/front-proxy-ca.crt --allow-privileged=true --experimental-bootstrap-token-auth=true --requestheader-group-headers=X-Remote-Group --tls-cert-file=/etc/kubernetes/pki/apiserver.crt --kubelet-client-key=/etc/kubernetes/pki/apiserver-kubelet-client.key --secure-port=6443 --tls-private-key-file=/etc/kubernetes/pki/apiserver.key --authorization-mode=RBAC --advertise-address=192.168.15.101 --etcd-servers=http://127.0.0.1:2379

我希望在etcd数据库中看到新创建的IP地址,不确定为什么不将其更新为etcd.

I expected to see newly created IP address in the etcd database not sure why its not updating to etcd.

解决此问题的任何帮助.

any help to resolve this issue.

谢谢 -SR

推荐答案

Kubernetes> 1.6默认使用etcd v3,从中可以看到您正在查询etcd v2,因此您看不到当前的kubernetes密钥.为了查询etcd v3,您必须设置ETCDCTL_API=3,然后检查特定的密钥.请记住,etcdctl v3命令与etcd v2不同.在此处检查: https://github.com/coreos/etcd/tree/master/etcdctl

Kubernetes >1.6 is using by default etcd v3, from what I can see you are querying etcd v2, so you are not seeing the current kubernetes keys. In order to query etcd v3, you have to set ETCDCTL_API=3 and then check for the specific key. Keep in mind, that etcdctl v3 commands are not the same as for etcd v2. Check it here: https://github.com/coreos/etcd/tree/master/etcdctl

这篇关于Kubernetes绒布etcd不更新的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆