0

I am trying to create load balancer service in k8s, However after creating the service, I should have received external IP but not able to see or get. Please find my service.yaml file or output as below:

kubectl get svc



NAME         TYPE           CLUSTER-IP       EXTERNAL-IP   PORT(S)          AGE
kubernetes   ClusterIP      10.96.0.1        <none>        443/TCP          6d8h
pcb-mtncm    LoadBalancer   10.102.152.215   <pending>     8080:30892/TCP   99m

FILE:

kind: Service 
apiVersion: v1 
metadata:
  name: test-load
  namespace: default
spec:
  type: LoadBalancer
  selector:
    app: test-load
  ports:
    - protocol: TCP
      port: 8080
      targetPort: 80

DEPLOYMENT-FILE:
apiVersion: apps/v1
kind: Deployment
metadata:
  creationTimestamp: null
  labels:
    app: test-load
  name: test-load
spec:
  replicas: 3
  selector:
    matchLabels:
      app: test-load
  strategy: {}
  template:
    metadata:
      creationTimestamp: null
      labels:
        app: test-load
    spec:
      containers:
      - image: ubuntu:latest
        name: ubuntu
        command: ["/bin/sleep", "3650d"]
        

        resources: {}
status: {}

Please help me to provide best solution.

I was expecting, I'll be getting external IP, which I'll be hitting on my browser with the mentioned port, but not able to getting external IP, it still appears in pending state.

mkrieger1
  • 19,194
  • 5
  • 54
  • 65
love arora
  • 11
  • 2
  • Can anyone suggest how can we configure aws cloud provider with my existing cluster in kubernetes – love arora Aug 08 '23 at 21:20
  • FILES POSTEDAGAIN:apiVersion: apps/v1 kind: Deployment metadata: creationTimestamp: null labels: app: test-load name: test-load spec: replicas: 3 selector: matchLabels: app: test-load strategy: {} template: metadata: creationTimestamp: null labels: app: test-load spec: containers: - image: ubuntu:latest name: ubuntu command: ["/bin/sleep", "3650d"] resources: {} status: {} – love arora Aug 08 '23 at 21:20

0 Answers0