Open kimllee opened 2 years ago
The ingress example probably shouldn't be there at all as Ingress configuration is typically cluster-specific.
My adapted / working example on K3S 1.23
# hello-kubernetes-ingress.yaml
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: hello-kubernetes-ingress
annotations:
kubernetes.io/ingress.class: nginx
nginx.ingress.kubernetes.io/rewrite-target: /$2
spec:
rules:
- http:
paths:
- pathType: Prefix #Exact
backend:
service:
name: hello-kubernetes-hello-world
port:
number: 80
path: /hello-world(/|$)(.*)
- pathType: Prefix #Exact
backend:
service:
name: hello-kubernetes-custom-message
port:
number: 80
path: /custom-message(/|$)(.*)
Hello,
The ingress example isn't working because now the api used is the networking v1 and the syntax doesn't seem to be recognized Tested with GKE 1.21.5 Thank you.