Skip to content

Instantly share code, notes, and snippets.

@nakamorichi
Created August 11, 2019 08:21
Show Gist options
  • Save nakamorichi/45c912bb72c752b9652639de246cdb0c to your computer and use it in GitHub Desktop.
Save nakamorichi/45c912bb72c752b9652639de246cdb0c to your computer and use it in GitHub Desktop.
Traefik 2.0 service definitions
# Connects Traefik with cloud provider's load balancer.
# All external traffic comes through here.
kind: Service
apiVersion: v1
metadata:
name: traefik-ingress-controller
namespace: default
spec:
type: LoadBalancer
loadBalancerIP: <put your load balancer IP address here>
selector:
app: traefik
ports:
- name: https
port: 443
targetPort: 443
---
# Exposes Traefik dashboard inside the cluster.
# External access is provided by IngressRoute.
kind: Service
apiVersion: v1
metadata:
name: traefik-dashboard
namespace: traefik
spec:
type: ClusterIP
selector:
app: traefik
ports:
- name: dashboard
port: 8080
targetPort: 8080
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment