AKS Cluster Created has no External IP Address

6.2k views Asked by At

I am using here to create a new AKS cluster. This has worked fine, however, when I look at the cluster I have noticed there is no External-IP (it shows )

How do I add an external IP address so that I can access the cluster externally?

I am using AKS within Azure

Paul

1

There are 1 answers

4
Carson On BEST ANSWER

kubectl apply -f {name of this file}.yml

apiVersion: v1
kind: Service
metadata:
  name: example-service
spec:
  selector:
    app: example
  ports:
    - port: 8765
      targetPort: 9376
  type: LoadBalancer

From https://kubernetes.io/docs/tasks/access-application-cluster/create-external-load-balancer/

This will create a load balancer that has an external ip address. You can specify one if you have a static IP as well.