I'm new to Kubernetes. I am facing the following issue.
I created a deployment using this command.
$ kubectl run simple-deployment-14 --image cooldocker19/manas-simple-flask:v1.0 --port=5000
To expose it as a service, I used this.
kubectl expose deployment simple-deployment-14 --port 5000 --type=LoadBalancer --name=simple-service
In the above command, when I use type=LoadBalancer
, then I see the EXTERNAL-IP is <pending>
and with type=NodePort
, then the EXTERNAL-IP is none
Here is the details of the service.
$ kubectl describe service simple-service-14
Name: simple-service-14
Namespace: default
Labels: run=simple-deployment-14
Annotations: <none>
Selector: run=simple-deployment-14
Type: NodePort
IP: 10.101.XXX.XXX
LoadBalancer Ingress: localhost
Port: <unset> 5000/TCP
TargetPort: 5000/TCP
NodePort: <unset> 31754/TCP
Endpoints: 10.1.X.XXX:5000
Session Affinity: None
External Traffic Policy: Cluster
Events: <none>
I was expecting to see a working endpoint on browser, but it doesn't show anything.
Reference endpoint: http://localhost:5000/test
What am I missing here ?