kubernetes - kubelet does not have ClusterDNS IP configured and cannot create Pod using "ClusterFirst" policy. Falling back to DNSDefault policy -




just started kubernetes. have 3 physical machines: 1 master, 2 nodes. did getting started configuration. seems , running, nodes can communicate master, when try install sample application (following kubernetes guide: https://kubernetes.io/docs/setup/independent/create-cluster-kubeadm/) warning on , on again:

'kubelet not have clusterdns ip configured , cannot create pod using "clusterfirst" policy. falling dnsdefault policy.'

and can't access app in: master_ip:30001 idea in going on , how fix it?

here configuration:

kubectl nodes  name                     status    age       version master-precision-t1600   ready     19h       v1.7.4 node2-precision-t1600    ready     19h       v1.7.4  kubectl pods --all-namespaces  namespace     name                                             ready     status    restarts   age kube-system   etcd-master-precision-t1600                      1/1       running   1          19h kube-system   kube-apiserver-master-precision-t1600            1/1       running   1          19h kube-system   kube-controller-manager-master-precision-t1600   1/1       running   1          19h kube-system   kube-dns-2425271678-xrlp4                        3/3       running   3          19h kube-system   kube-proxy-58qm6                                 1/1       running   1          19h kube-system   kube-proxy-tjskl                                 1/1       running   1          19h kube-system   kube-scheduler-master-precision-t1600            1/1       running   1          19h kube-system   kubernetes-dashboard-3313488171-7n56j            1/1       running   0          38m kube-system   weave-net-1hjxl                                  2/2       running   2          19h kube-system   weave-net-lwk8r                                  2/2       running   2          19h sock-shop     carts-2469883122-h8f4n                           1/1       running   0          1h sock-shop     carts-db-1721187500-pkpk0                        1/1       running   0          1h sock-shop     catalogue-4293036822-hpkgp                       1/1       running   0          1h sock-shop     catalogue-db-1846494424-xlb8m                    1/1       running   0          1h sock-shop     front-end-2337481689-s8bkm                       1/1       running   0          1h sock-shop     orders-733484335-n7h4c                           1/1       running   0          1h sock-shop     orders-db-3728196820-12rt8                       1/1       running   0          1h sock-shop     payment-3050936124-kwqfs                         1/1       running   0          1h sock-shop     queue-master-2067646375-n8sgj                    1/1       running   0          1h sock-shop     rabbitmq-241640118-dqh6p                         1/1       running   0          1h sock-shop     shipping-2463450563-g01sw                        1/1       running   0          1h sock-shop     user-1574605338-kwqmp                            1/1       running   0          1h sock-shop     user-db-3152184577-w3f39                         1/1       running   0          1h  kubectl describe nodes name:           master-precision-t1600 role:            labels:         beta.kubernetes.io/arch=amd64             beta.kubernetes.io/os=linux             kubernetes.io/hostname=master-precision-t1600             node-role.kubernetes.io/master= annotations:        node.alpha.kubernetes.io/ttl=0             volumes.kubernetes.io/controller-managed-attach-detach=true taints:         node-role.kubernetes.io/master:noschedule creationtimestamp:  tue, 22 aug 2017 17:05:06 +0200 conditions:   type          status  lastheartbeattime           lasttransitiontime          reason              message   ----          ------  -----------------           ------------------          ------              -------   outofdisk         false   wed, 23 aug 2017 12:26:45 +0200     tue, 22 aug 2017 17:05:02 +0200     kubelethassufficientdisk    kubelet has sufficient disk space available   memorypressure    false   wed, 23 aug 2017 12:26:45 +0200     tue, 22 aug 2017 17:05:02 +0200     kubelethassufficientmemory  kubelet has sufficient memory available   diskpressure      false   wed, 23 aug 2017 12:26:45 +0200     tue, 22 aug 2017 17:05:02 +0200     kubelethasnodiskpressure    kubelet has no disk pressure   ready         true    wed, 23 aug 2017 12:26:45 +0200     tue, 22 aug 2017 17:05:02 +0200     kubeletready            kubelet posting ready status. apparmor enabled addresses:   internalip:   xxx.xxx.xxx.215   hostname: master-precision-t1600 capacity:  alpha.kubernetes.io/nvidia-gpu:    0  cpu:                   8  memory:                8127968ki  pods:                  110 allocatable:  alpha.kubernetes.io/nvidia-gpu:    0  cpu:                   8  memory:                8025568ki  pods:                  110 system info:  machine id:            d718aa59fbe54581a9b058eb453ca453  system uuid:           4c4c4544-005a-4410-805a-c4c04f32354a  boot id:           687c603a-aad9-477a-a398-dfffeeaa4cd0  kernel version:        4.10.0-32-generic  os image:          ubuntu 16.04.3 lts  operating system:      linux  architecture:          amd64  container runtime version: docker://1.11.2  kubelet version:       v1.7.4  kube-proxy version:        v1.7.4 externalid:         master-precision-t1600 non-terminated pods:        (8 in total)   namespace         name                            cpu requests    cpu limits  memory requests memory limits   ---------         ----                            ------------    ----------  --------------- -------------   kube-system           etcd-master-precision-t1600             0 (0%)      0 (0%)      0 (0%)      0 (0%)   kube-system           kube-apiserver-master-precision-t1600           250m (3%)   0 (0%)      0 (0%)      0 (0%)   kube-system           kube-controller-manager-master-precision-t1600      200m (2%)   0 (0%)      0 (0%)      0 (0%)   kube-system           kube-dns-2425271678-xrlp4               260m (3%)   0 (0%)      110mi (1%)  170mi (2%)   kube-system           kube-proxy-58qm6                    0 (0%)      0 (0%)      0 (0%)      0 (0%)   kube-system           kube-scheduler-master-precision-t1600           100m (1%)   0 (0%)      0 (0%)      0 (0%)   kube-system           kubernetes-dashboard-3313488171-7n56j           0 (0%)      0 (0%)      0 (0%)      0 (0%)   kube-system           weave-net-1hjxl                     20m (0%)    0 (0%)      0 (0%)      0 (0%) allocated resources:   (total limits may on 100 percent, i.e., overcommitted.)   cpu requests  cpu limits  memory requests memory limits   ------------  ----------  --------------- -------------   830m (10%)    0 (0%)      110mi (1%)  170mi (2%) events:   firstseen lastseen    count                  subobjectpath   type        reason          message   --------- --------    -----   ----                -------------   --------    ------          -------   39m       30s     36  kubelet, master-precision-t1600         warning     missingclusterdns   kubelet not have clusterdns ip configured , cannot create pod using "clusterfirst" policy. pod: "kubernetes-dashboard-3313488171-7n56j_kube-system(1ed597d4-87e8-11e7-ab01-782bcba630bb)". falling dnsdefault policy.   name:           node2-precision-t1600 role:            labels:         beta.kubernetes.io/arch=amd64             beta.kubernetes.io/os=linux             kubernetes.io/hostname=node2-precision-t1600 annotations:        node.alpha.kubernetes.io/ttl=0             volumes.kubernetes.io/controller-managed-attach-detach=true taints:         <none> creationtimestamp:  tue, 22 aug 2017 17:10:43 +0200 conditions:   type          status  lastheartbeattime           lasttransitiontime          reason              message   ----          ------  -----------------           ------------------          ------              -------   outofdisk         false   wed, 23 aug 2017 12:26:49 +0200     wed, 23 aug 2017 11:42:43 +0200     kubelethassufficientdisk    kubelet has sufficient disk space available   memorypressure    false   wed, 23 aug 2017 12:26:49 +0200     wed, 23 aug 2017 11:42:43 +0200     kubelethassufficientmemory  kubelet has sufficient memory available   diskpressure      false   wed, 23 aug 2017 12:26:49 +0200     wed, 23 aug 2017 11:42:43 +0200     kubelethasnodiskpressure    kubelet has no disk pressure   ready         true    wed, 23 aug 2017 12:26:49 +0200     wed, 23 aug 2017 11:42:43 +0200     kubeletready            kubelet posting ready status. apparmor enabled addresses:   internalip:   129.241.110.167   hostname: node2-precision-t1600 capacity:  alpha.kubernetes.io/nvidia-gpu:    1  cpu:                   8  memory:                8127968ki  pods:                  110 allocatable:  alpha.kubernetes.io/nvidia-gpu:    1  cpu:                   8  memory:                8025568ki  pods:                  110 system info:  machine id:            d701c70173f547168978ca276552bb88  system uuid:           4c4c4544-005a-4410-805a-b5c04f32354a  boot id:           827de455-66cb-481d-a362-557a17db11f4  kernel version:        4.10.0-32-generic  os image:          ubuntu 16.04.3 lts  operating system:      linux  architecture:          amd64  container runtime version: docker://1.11.2  kubelet version:       v1.7.4  kube-proxy version:        v1.7.4 externalid:         node2-precision-t1600 non-terminated pods:        (15 in total)   namespace         name                    cpu requests    cpu limits  memory requests memory limits   ---------         ----                    ------------    ----------  --------------- -------------   kube-system           kube-proxy-tjskl            0 (0%)      0 (0%)      0 (0%)      0 (0%)   kube-system           weave-net-lwk8r             20m (0%)    0 (0%)      0 (0%)      0 (0%)   sock-shop         carts-2469883122-h8f4n          0 (0%)      0 (0%)      0 (0%)      0 (0%)   sock-shop         carts-db-1721187500-pkpk0       0 (0%)      0 (0%)      0 (0%)      0 (0%)   sock-shop         catalogue-4293036822-hpkgp      0 (0%)      0 (0%)      0 (0%)      0 (0%)   sock-shop         catalogue-db-1846494424-xlb8m       0 (0%)      0 (0%)      0 (0%)      0 (0%)   sock-shop         front-end-2337481689-s8bkm      100m (1%)   0 (0%)      100mi (1%)  0 (0%)   sock-shop         orders-733484335-n7h4c          0 (0%)      0 (0%)      0 (0%)      0 (0%)   sock-shop         orders-db-3728196820-12rt8      0 (0%)      0 (0%)      0 (0%)      0 (0%)   sock-shop         payment-3050936124-kwqfs        0 (0%)      0 (0%)      0 (0%)      0 (0%)   sock-shop         queue-master-2067646375-n8sgj       0 (0%)      0 (0%)      0 (0%)      0 (0%)   sock-shop         rabbitmq-241640118-dqh6p        0 (0%)      0 (0%)      0 (0%)      0 (0%)   sock-shop         shipping-2463450563-g01sw       0 (0%)      0 (0%)      0 (0%)      0 (0%)   sock-shop         user-1574605338-kwqmp           0 (0%)      0 (0%)      0 (0%)      0 (0%)   sock-shop         user-db-3152184577-w3f39        0 (0%)      0 (0%)      0 (0%)      0 (0%) allocated resources:   (total limits may on 100 percent, i.e., overcommitted.)   cpu requests  cpu limits  memory requests memory limits   ------------  ----------  --------------- -------------   120m (1%) 0 (0%)      100mi (1%)  0 (0%) events:   firstseen lastseen    count                      subobjectpath   type        reason          message   --------- --------    -----   ----                    -------------   --------    ------          -------   44m       44m     1   kubelet, node2-precision-t1600              normal      nodeready       node node2-precision-t1600 status now: nodeready   44m       44m     3   kubelet, node2-precision-t1600              normal      nodehassufficientdisk   node node2-precision-t1600 status now: nodehassufficientdisk   44m       44m     3   kubelet, node2-precision-t1600              normal      nodehassufficientmemory node node2-precision-t1600 status now: nodehassufficientmemory   44m       44m     3   kubelet, node2-precision-t1600              normal      nodehasnodiskpressure   node node2-precision-t1600 status now: nodehasnodiskpressure   44m       44m     1   kubelet, node2-precision-t1600              normal      nodeallocatableenforced updated node allocatable limit across pods   44m       44m     1   kubelet, node2-precision-t1600              warning     rebooted        node node2-precision-t1600 has been rebooted, boot id: 827de455-66cb-481d-a362-557a17db11f4   44m       44m     1   kubelet, node2-precision-t1600              normal      starting        starting kubelet.   44m       44m     1   kube-proxy, node2-precision-t1600           normal      starting        starting kube-proxy.   43m       11m     9   kubelet, node2-precision-t1600              warning     missingclusterdns   kubelet not have clusterdns ip configured , cannot create pod using "clusterfirst" policy. pod: "rabbitmq-241640118-dqh6p_sock-shop(79e3bb08-87e4-11e7-ab01-782bcba630bb)". falling dnsdefault policy.   44m       5m      24  kubelet, node2-precision-t1600              warning     missingclusterdns   kubelet not have clusterdns ip configured , cannot create pod using "clusterfirst" policy. pod: "orders-db-3728196820-12rt8_sock-shop(79ca1e21-87e4-11e7-ab01-782bcba630bb)". falling dnsdefault policy.   44m       2m      22  kubelet, node2-precision-t1600              warning     missingclusterdns   kubelet not have clusterdns ip configured , cannot create pod using "clusterfirst" policy. pod: "payment-3050936124-kwqfs_sock-shop(79cb96f4-87e4-11e7-ab01-782bcba630bb)". falling dnsdefault policy.   44m       2m      28  kubelet, node2-precision-t1600              warning     missingclusterdns   kubelet not have clusterdns ip configured , cannot create pod using "clusterfirst" policy. pod: "shipping-2463450563-g01sw_sock-shop(79fa9dd4-87e4-11e7-ab01-782bcba630bb)". falling dnsdefault policy.   43m       2m      22  kubelet, node2-precision-t1600              warning     missingclusterdns   kubelet not have clusterdns ip configured , cannot create pod using "clusterfirst" policy. pod: "carts-2469883122-h8f4n_sock-shop(79bbf964-87e4-11e7-ab01-782bcba630bb)". falling dnsdefault policy.   44m       1m      30  kubelet, node2-precision-t1600              warning     missingclusterdns   kubelet not have clusterdns ip configured , cannot create pod using "clusterfirst" policy. pod: "user-db-3152184577-w3f39_sock-shop(7a303582-87e4-11e7-ab01-782bcba630bb)". falling dnsdefault policy.   44m       1m      16  kubelet, node2-precision-t1600              warning     missingclusterdns   kubelet not have clusterdns ip configured , cannot create pod using "clusterfirst" policy. pod: "user-1574605338-kwqmp_sock-shop(7a11a937-87e4-11e7-ab01-782bcba630bb)". falling dnsdefault policy.   44m       1m      20  kubelet, node2-precision-t1600              warning     missingclusterdns   kubelet not have clusterdns ip configured , cannot create pod using "clusterfirst" policy. pod: "catalogue-db-1846494424-xlb8m_sock-shop(79c24789-87e4-11e7-ab01-782bcba630bb)". falling dnsdefault policy.   44m       54s     26  kubelet, node2-precision-t1600              warning     missingclusterdns   kubelet not have clusterdns ip configured , cannot create pod using "clusterfirst" policy. pod: "queue-master-2067646375-n8sgj_sock-shop(79d46bb2-87e4-11e7-ab01-782bcba630bb)". falling dnsdefault policy.   44m       45s     30  kubelet, node2-precision-t1600              warning     missingclusterdns   kubelet not have clusterdns ip configured , cannot create pod using "clusterfirst" policy. pod: "front-end-2337481689-s8bkm_sock-shop(79c49a6c-87e4-11e7-ab01-782bcba630bb)". falling dnsdefault policy.   44m       24s     11  kubelet, node2-precision-t1600              warning     missingclusterdns   kubelet not have clusterdns ip configured , cannot create pod using "clusterfirst" policy. pod: "carts-db-1721187500-pkpk0_sock-shop(79bd1f99-87e4-11e7-ab01-782bcba630bb)". falling dnsdefault policy.   43m       11s     25  kubelet, node2-precision-t1600              warning     missingclusterdns   kubelet not have clusterdns ip configured , cannot create pod using "clusterfirst" policy. pod: "catalogue-4293036822-hpkgp_sock-shop(79bf628c-87e4-11e7-ab01-782bcba630bb)". falling dnsdefault policy.   43m       3s      25  kubelet, node2-precision-t1600              warning     missingclusterdns   kubelet not have clusterdns ip configured , cannot create pod using "clusterfirst" policy. pod: "orders-733484335-n7h4c_sock-shop(79c6f31c-87e4-11e7-ab01-782bcba630bb)". falling dnsdefault policy.   43m       0s      228 kubelet, node2-precision-t1600              warning     missingclusterdns   (combined similar events): kubelet not have clusterdns ip configured , cannot create pod using "clusterfirst" policy. pod: "payment-3050936124-kwqfs_sock-shop(79cb96f4-87e4-11e7-ab01-782bcba630bb)". falling dnsdefault policy. 

edit 1: mike told me in answer got dns ip : kubectl services --namespace=kube-system. things i've tried far change command-line flags:

  1. add in execstart kubeadm.conf --cluster-dns 10.96.0.10
  2. execute kubelet --cluster-dns 10.96.0.10

both without results

the kubelet service needs command-line flag set cluster dns ip - looks you're running kube-dns, can ip either running kubectl services --namespace=kube-system or grabbing ip "clusterip" field on kube-dns service yaml or json config.

once have ip, you'll have set --cluster-dns command-line flag kubelet.

i haven't used kubeadm setup cluster, i'm not sure how runs services , can't how change command-line flags - knows can provide input piece.





wiki

Comments

Popular posts from this blog

Asterisk AGI Python Script to Dialplan does not work -

python - Read npy file directly from S3 StreamingBody -

kotlin - Out-projected type in generic interface prohibits the use of metod with generic parameter -