I am facing issue related to kubernetes service external Ip. It is showing as 'pending'. I created deployment of type Load Balancer. I am using docker-desktop.
Please find below my YAML for creating deployment-
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: load-balancer
name: nginxdeployment
spec:
replicas: 3
selector:
matchLabels:
app: load-balancer
template:
metadata:
labels:
app: load-balancer
spec:
containers:
- image: nginx
name: nginxcontainer
ports:
- containerPort: 8080
Here is the command which I have used to expose my deployment- kubectl expose deployment nginxdeployment --type=LoadBalancer --name=nginxservice.
Below is the screenshot of exposed service in CLI- Kubernets CLI screenshot
As highlighted in yellow in above image, it is showing pending under external IP for load balancer Service.
Please help me how come I can resolve this issue. It should IP instead of pending.
Thank you in Advance!!!