Skip to content

Create Service for Admin UI

To expose the Admin UI to external clients (outside of your cluster) run the following command to create a LoadBalancer service.

kubectl apply -f cloud-proxy-ui-service-aks.yaml --validate

The cloud-proxy-ui-service.yaml file looks like the following. Note how we allow only our IP address 1.2.3.4/32 to access this service. In production you most probably will need to deploy an Azure firewall in front of the AKS cluster and set up the normal firewall access rules there.

apiVersion: v1
kind: Service
metadata:
  name: cloud-proxy-ui
spec:
  type: LoadBalancer
  selector:
    app: cloud-proxy-ui
  ports:
    - port: 80
      targetPort: 80
  loadBalancerSourceRanges:
    - 1.2.3.4/32

To see the status of the created service run kubectl get services - the output should show our service up and running. It should also show the public IP address we can connect to in the browser to access the Admin UI of Cloud Proxy.

# kubectl get services
NAME             TYPE           CLUSTER-IP     EXTERNAL-IP   PORT(S)        AGE
cloud-proxy-ui   LoadBalancer   10.0.163.144   20.8.33.80    80:30499/TCP   30s
kubernetes       ClusterIP      10.0.0.1       <none>        443/TCP        6m4s