diff --git a/nginx/ingress.yaml b/nginx/ingress.yaml index 2dee392..e41cc09 100644 --- a/nginx/ingress.yaml +++ b/nginx/ingress.yaml @@ -8,22 +8,19 @@ spec: - /nginx --- -apiVersion: networking.k8s.io/v1 -kind: Ingress +apiVersion: traefik.containo.us/v1alpha1 +kind: IngressRoute metadata: name: nginx-ingress annotations: - kubernetes.io/ingress.class: "traefik" "traefik.ingress.kubernetes.io/router.middlewares": default-stripprefix@kubernetescrd + spec: - rules: - - host: nginx.localhost - http: - paths: - - path: / - pathType: Prefix - backend: - service: - name: nginx-svc - port: - number: 80 + entryPoints: + - web + routes: + - match: Host(`nginx.diogenes.halia`) + kind: Rule + services: + - name: nginx-svc + port: 80 diff --git a/nginx/service.yaml b/nginx/service.yaml index 1d973e2..1274b5a 100644 --- a/nginx/service.yaml +++ b/nginx/service.yaml @@ -2,7 +2,10 @@ apiVersion: v1 kind: Service metadata: name: nginx-svc + labels: + app: nginx spec: + type: ClusterIP ports: - name: http port: 80