--- apiVersion: v1 kind: Namespace metadata: name: whoami --- apiVersion: apps/v1 kind: Deployment metadata: name: whoami namespace: whoami spec: selector: matchLabels: app: whoami replicas: 2 template: metadata: labels: app: whoami spec: containers: - name: whoami image: traefik/whoami:v1.8 ports: - containerPort: 80 name: http-web-svc --- apiVersion: v1 kind: Service metadata: name: whoami-service namespace: whoami spec: selector: app: whoami type: ClusterIP ports: - name: whoami-port protocol: TCP port: 80 targetPort: http-web-svc --- apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: whoami-lan namespace: whoami annotations: traefik.ingress.kubernetes.io/router.entrypoints: websecure traefik.ingress.kubernetes.io/router.middlewares: kube-system-lanonly@kubernetescrd spec: rules: - host: whoami.lan.jibby.org http: paths: - path: / pathType: Prefix backend: service: name: whoami-service port: number: 80 --- apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: whoami namespace: whoami annotations: traefik.ingress.kubernetes.io/router.entrypoints: websecure spec: rules: - host: whoami.jibby.org http: paths: - path: / pathType: Prefix backend: service: name: whoami-service port: number: 80