Reputation: 107
I have an application deployed in Azure Kubernetes services which has a built in Web API service hosted on port 8080. I need to be able to expose this API to the outside of the K8 pod to the outside world.
What is the best practice to achieve this?
Upvotes: 0
Views: 1015
Reputation: 2807
With an Kubernetes Service and an Azure Load Balancer:
apiVersion: v1
kind: Service
metadata:
name: public-svc
spec:
type: LoadBalancer
ports:
- port: 80
selector:
app: public-app
The type LoadBalancer will create a Azure Load Balancer with a Public IP in the AKS management resource group.
Documentation can be found here
Upvotes: 1