python/django/python-hello-world/kubernetes-manifests/hello.service.yaml (16 lines of code) (raw):

# This Service manifest defines: # - a load balancer for pods matching label "app: django-python-hello-world" # - exposing the application to the public Internet (type:LoadBalancer) # - routes port 80 of the load balancer to the port 8080 of the Pods. # Syntax reference https://kubernetes.io/docs/concepts/configuration/overview/ apiVersion: v1 kind: Service metadata: name: django-python-hello-world-external labels: app: django-python-hello-world tier: app spec: type: LoadBalancer ports: - name: http port: 80 targetPort: 8080 selector: app: django-python-hello-world tier: app