Kubernetes - not unique ip per pod -


i'm building 3 vm (centos 7) cluster of kubernetes 1.3.2. according kubernetes documentation page networking in kubernetes: “we give every pod own ip address” , there no port collision when few pods use same ports on same node. seen here, pods same ip addresses:

[root@gloom kuber-test]# kubectl pods -o wide -l app=userloc name                          ready     status    restarts   age       ip           node userloc-dep-857294609-0am9d   1/1       running   0          27m       172.17.0.5   157.244.150.86 userloc-dep-857294609-a4538   1/1       running   0          27m       172.17.0.7   157.244.150.96 userloc-dep-857294609-c4wzy   1/1       running   0          6h        172.17.0.3   157.244.150.86 userloc-dep-857294609-hbl9i   1/1       running   0          6h        172.17.0.5   157.244.150.96 userloc-dep-857294609-rpgyd   1/1       running   0          27m       172.17.0.5   157.244.150.198 userloc-dep-857294609-tnnho   1/1       running   0          6h        172.17.0.3   157.244.150.198 

what miss?

edit - 31/07/16:
following sven walter's comments, maybe issue somehow ips pods had received of docker bridge subnet 172.17.0.0/16 (which not distinct per node) instead of flannel’s subnets 10.x.x.x/24 (which distinct per node). can issue?

in case needed, here deployment yaml:

apiversion: extensions/v1beta1 kind: deployment metadata:   name: userloc-dep  spec:   replicas: 6   template:     metadata:       labels:         app: userloc     spec:       containers:       - name: userloc         image: globe:5000/openlso/userlocation-ms:0.1          ports:         - containerport: 8081 

after configuring flannel, assuming did correctly, each node grab slice of overall ip network cidr. can figure out cidr assigned node doing etcd ls -r , looking key "coreos.com". subnet slices assigned each node should unique.

once node has subnet, flannel assigns cidr flannel.0 (a vxlan device) , need restart docker, eg: https://github.com/coreos/flannel#docker-integration. if failed restart docker, or options wrong, or flannel isn't running on node, or non-unique subnets assigned different nodes, things won't work expected. reply if need more debugging , can take there.


Comments

Popular posts from this blog

magento2 - Magento 2 admin grid add filter to collection -

Android volley - avoid multiple requests of the same kind to the server? -

Combining PHP Registration and Login into one class with multiple functions in one PHP file -