Last active
April 20, 2018 01:58
-
-
Save ToroNZ/aba942aade846b81f34132f06ead7396 to your computer and use it in GitHub Desktop.
Traefik DaemonSet
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
apiVersion: v1 | |
kind: ServiceAccount | |
metadata: | |
name: traefik-ingress-controller | |
namespace: kube-system | |
--- | |
kind: ConfigMap | |
apiVersion: v1 | |
metadata: | |
name: traefik-conf | |
namespace: kube-system | |
data: | |
traefik-config: |- | |
defaultEntryPoints = ["http","https"] | |
[entryPoints] | |
[entryPoints.http] | |
address = ":80" | |
[entryPoints.http.redirect] | |
entryPoint = "https" | |
[entryPoints.https] | |
address = ":443" | |
[entryPoints.https.tls] | |
[[entryPoints.https.tls.certificates]] | |
CertFile = "/ssl/traefik.pem" | |
KeyFile = "/ssl/traefik-key.pem" | |
--- | |
kind: DaemonSet | |
apiVersion: extensions/v1beta1 | |
metadata: | |
name: traefik-ingress-controller | |
namespace: kube-system | |
labels: | |
k8s-app: traefik-ingress-lb | |
spec: | |
template: | |
metadata: | |
labels: | |
k8s-app: traefik-ingress-lb | |
name: traefik-ingress-lb | |
spec: | |
serviceAccountName: traefik-ingress-controller | |
terminationGracePeriodSeconds: 60 | |
hostNetwork: true | |
containers: | |
- image: traefik | |
name: traefik-ingress-lb | |
ports: | |
- name: http | |
containerPort: 80 | |
hostPort: 80 | |
- name: https | |
containerPort: 443 | |
hostPort: 443 | |
- name: admin | |
containerPort: 8080 | |
securityContext: | |
capabilities: | |
drop: | |
- ALL | |
add: | |
- NET_BIND_SERVICE | |
volumeMounts: | |
- mountPath: "/ssl" | |
name: "ssl" | |
- mountPath: "/config" | |
name: "config" | |
args: | |
- --api | |
- --kubernetes | |
- --logLevel=INFO | |
- --configfile=/config/traefik.toml | |
volumes: | |
- name: ssl | |
secret: | |
secretName: traefik-cert | |
- name: config | |
configMap: | |
name: traefik-conf | |
--- | |
kind: Service | |
apiVersion: v1 | |
metadata: | |
name: traefik-ingress-service | |
namespace: kube-system | |
spec: | |
selector: | |
k8s-app: traefik-ingress-lb | |
ports: | |
- protocol: TCP | |
port: 80 | |
name: http | |
- protocol: TCP | |
port: 443 | |
name: https | |
- protocol: TCP | |
port: 8080 | |
name: admin | |
type: NodePort |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment