kubernetes service external ip pending

0 votes

I am trying to deploy nginx on kubernetes, kubernetes version is v1.5.2, I have deployed nginx with 3 replica, YAML file is below,

apiVersion: extensions/v1beta1
kind: Deployment
metadata:
  name: deployment-example
spec:
  replicas: 3
  revisionHistoryLimit: 2
  template:
    metadata:
      labels:
        app: nginx
    spec:
      containers:
      - name: nginx
        image: nginx:1.10
        ports:
        - containerPort: 80

and now I want to expose its port 80 on port 30062 of node, for that I created a service below,

kind: Service
apiVersion: v1
metadata:
  name: nginx-ils-service
spec:
  ports:
    - name: http
      port: 80
      nodePort: 30062
  selector:
    app: nginx
  type: LoadBalancer

this service is working good as it should be, but it is showing as pending not only on kubernetes dashboard also on terminal. 

Aug 31, 2018 in Kubernetes by lina
• 8,110 points
257 views
Are you deploying this cluster on Minikube?
Yess @Kalgi, i'm using minikube.

2 answers to this question.

0 votes
There is no LoadBalancer when you use Minikube. If you're trying out the service type you need to deploy your application on a cloud platform such as AWS.

These cloud platforms have an inbuild LoadBalancer and you can only use the service type: LoadBalancer in such cases.

Try replacing your service type to NodePort and let me know if it works.
answered Oct 8, 2018 by Kalgi
• 42,330 points
0 votes

This question is very similar to this.

answered Oct 8, 2018 by Nilesh
• 6,880 points

Related Questions In Kubernetes

0 votes
1 answer

External IP not working with Minikube Kubernetes

You can use an ingress controller on ...READ MORE

answered Jan 24 in Kubernetes by DareDev
• 6,810 points
421 views
+5 votes
2 answers

Redirecting host to service path in kubernetes

What you are trying to do is ...READ MORE

answered Mar 27, 2018 in Kubernetes by DragonLord999
• 8,380 points
112 views
0 votes
1 answer

How can I access a service installed on Kubernetes from anywhere?

I have followed the link which you have ...READ MORE

answered Jul 23, 2018 in Kubernetes by Atul
• 10,240 points
154 views
0 votes
1 answer

Kubernetes ingress IP is set to docker0 ip

The issue here was the kubelet configuration. ...READ MORE

answered Sep 10, 2018 in Kubernetes by Kalgi
• 42,330 points
42 views
0 votes
1 answer
0 votes
3 answers

Error while joining cluster with node

Hi Kalgi after following above steps it ...READ MORE

answered Jan 17 in Others by anonymous
3,006 views
+3 votes
1 answer
0 votes
2 answers

kubernetes service external ip pending

If you are not using GCE or ...READ MORE

answered Aug 31, 2018 in Kubernetes by Nilesh
• 6,880 points
4,151 views
0 votes
1 answer

Filter source ip in kubernetes ingress in GCE

This feature currently works only with nginx. Example ...READ MORE

answered Sep 7, 2018 in Kubernetes by Kalgi
• 42,330 points
262 views