0

everyone I'm asking this question because there was an error while making 3 tier with Kubernetes

---

apiVersion: v1
kind: Service
metadata:
  name: petclinic-svc
spec:
  type: LoadBalancer
  selector:
    app: petclinic-app
  ports:
    - port: 80
      protocol: TCP
      targetPort: 80


---

apiVersion: v1
kind: ConfigMap
metadata:
  namespace: metallb-system
  name: metallb-config
data:
  config: |
    address-pools:
    - name: default
      protocol: layer2
      addresses:
      - 192.168.56.240-192.168.56.250

I wrote the yaml file If you do kubectl apply -f 000.yaml,

NAME                                        READY   STATUS    RESTARTS   AGE
pod/petclinic-deployment-5df754cc5c-nfj84   3/3     Running   0          7m12s

NAME                    TYPE           CLUSTER-IP       EXTERNAL-IP   PORT(S)        AGE
service/kubernetes      ClusterIP      10.96.0.1        <none>        443/TCP        4d21h
service/petclinic-svc   LoadBalancer   10.102.197.181   <pending>     80:31925/TCP   7m12s

NAME                                   READY   UP-TO-DATE   AVAILABLE   AGE
deployment.apps/petclinic-deployment   1/1     1            1           7m12s

NAME                                              DESIRED   CURRENT   READY   AGE
replicaset.apps/petclinic-deployment-5df754cc5c   1         1         1       7m12s

pending in load balancer I want to solve this problem

David Maze
  • 130,717
  • 29
  • 175
  • 215
Mraim
  • 1
  • 1
  • You will need to add information about what the actual issue is that you're facing and how that manifests. Error messages and logs, can help the community to help you. – Rick Rackow Oct 04 '22 at 09:49
  • This often means that your cluster is not configured to run a controller to actually create a load balancer. Doing that is specific to how and where your cluster is installed, and is not typically a programming problem. The linked question has several examples, including for more developer-oriented tools like minikube. – David Maze Oct 04 '22 at 10:15

0 Answers0