kubernetes-sigs / kubespray

Deploy a Production Ready Kubernetes Cluster
Apache License 2.0
16.11k stars 6.46k forks source link

Install OK but external IPs are always "pending" #3576

Closed sdesbure closed 6 years ago

sdesbure commented 6 years ago

BUG REPORT

Install of kubernetes seems OK but I can't have an external IP address. Here's an example after installation of heimdall (but it work with all deployment):

---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
  name: heimdall
spec:
  replicas: 1
  selector:
    matchLabels:
       app: heimdall
  template:
    metadata:
      labels:
        app: heimdall
    spec:
      containers:
      - name: heimdall
        image: linuxserver/heimdall
        ports:
          - containerPort: 80
---
apiVersion: v1
kind: Service
metadata:
  name: heimdall
spec:
  ports:
    - name: http
      port: 80
      protocol: TCP
      targetPort: 80
  selector:
    app: heimdall
  type: LoadBalancer
kubectl get svc
NAME         TYPE           CLUSTER-IP      EXTERNAL-IP   PORT(S)        AGE
heimdall     LoadBalancer   10.233.60.222   <pending>     80:32020/TCP   2m
kubernetes   ClusterIP      10.233.0.1      <none>        443/TCP        5h

I've got some pending for several hours on other pods

Environment:

Kubespray version (commit) (git rev-parse --short HEAD): v2.7.0 (99352e5)

Network plugin used: Calico, Weave and Flannel

Copy of your inventory file:

[jumphost]
jumphost0 ansible_host=pod4.opnfv.fr ansible_user=opnfv pod=onap_2_k8s_daily_pod4

[kube-master]
control01 ansible_host=10.4.2.166 ansible_user=debian ip=10.253.0.6
[monitoring]
control01 ansible_host=10.4.2.166 ansible_user=debian ip=10.253.0.6
[kube-node]
compute01 ansible_host=10.4.2.169 ansible_user=debian ip=10.253.0.4
compute02 ansible_host=10.4.2.173 ansible_user=debian ip=10.253.0.7
compute03 ansible_host=10.4.2.174 ansible_user=debian ip=10.253.0.3
compute04 ansible_host=10.4.2.24 ansible_user=debian ip=10.253.0.16
compute05 ansible_host=10.4.2.168 ansible_user=debian ip=10.253.0.13
compute06 ansible_host=10.4.2.179 ansible_user=debian ip=10.253.0.11
compute07 ansible_host=10.4.2.149 ansible_user=debian ip=10.253.0.17
compute08 ansible_host=10.4.2.176 ansible_user=debian ip=10.253.0.10
compute09 ansible_host=10.4.2.33 ansible_user=debian ip=10.253.0.9
compute10 ansible_host=10.4.2.134 ansible_user=debian ip=10.253.0.18
compute11 ansible_host=10.4.2.90 ansible_user=debian ip=10.253.0.12
compute12 ansible_host=10.4.2.195 ansible_user=debian ip=10.253.0.5
[etcd]
control01 ansible_host=10.4.2.166 ansible_user=debian ip=10.253.0.6

[k8s-cluster:children]
kube-master
kube-node
monitoring
[k8s-full-cluster:children]
k8s-cluster
jumphost

Command used to invoke ansible: ansible-playbook -i ../kubespray_inventory/infra -b cluster.yml --vault-id ../.vault

Output of ansible run: Ends OK

Anything else do we need to know: installation is done via gitlab ci from this opensource project: https://gitlab.com/Orange-OpenSource/lfn/infra/kubespray_automatic_installation

I've tried with and without cloud_provider to openstack but still the same issue

ant31 commented 6 years ago

External-Ip are related to your cloud provider configuration. There's nothing configured around that on kubespray.

sdesbure commented 6 years ago

Hello Antoine, thanks for the quick reply. But how do I do it? in rancher, it's "automatic" (binded to one of the compute I assume) and I would like to know if such behavior could be replicated with kubespray

sdesbure commented 6 years ago

Hello all, I've finally found an answer in internet. In order to make it work, I "just" have to specify the external IP address (of one of the nodes) and it works 👍

I close the issue then

alireza-esmaeeli commented 4 years ago

Hello all, I've finally found an answer in internet. In order to make it work, I "just" have to specify the external IP address (of one of the nodes) and it works 👍

I close the issue then

Hi, I have the same problem when I install k8s cluster with kubespray. Now, what do you mean by "specifying the external IP address of one of the nodes"? where did you specify that? In your kubespray configuration?