helm
helm copied to clipboard
No matches for kind "Ingress" in version "extensions/v1beta1" error in Lab 1
Getting the following error while trying to run this command in the first lab: kubectl apply -f ingress.yaml
error: resource mapping not found for name: "guestbook-ingress" namespace: "" from "ingress.yaml": no matches for kind "Ingress" in version "extensions/v1beta1"
ensure CRDs are installed first
Here is the solution: https://stackoverflow.com/a/71580831
Agree .. there is a solution
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: guestbook-ingress
annotations:
nginx.ingress.kubernetes.io/rewrite-target: /
spec:
rules:
- host: frontend.minikube.local
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: frontend
port:
number: 80
- host: backend.minikube.local
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: backend
port:
number: 80