Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lab1 Does Ingress Does Not Work With Later Versions of K8s #30

Closed
NiallJude opened this issue Nov 17, 2021 · 2 comments
Closed

Lab1 Does Ingress Does Not Work With Later Versions of K8s #30

NiallJude opened this issue Nov 17, 2021 · 2 comments

Comments

@NiallJude
Copy link

NiallJude commented Nov 17, 2021

Starting in version 1.19, K8s dropped support for extenstions/v1beta1 Ingress and now, you must use networking.k8s.io/v1 but there are also some changes to fields + variables which are necessary to update the ingress.yaml. Do you have a version available which is compatible? I would prefer not to rollback my k8s version.

Error:

kubectl apply -f ../../lab1_kubectl_version1/yaml/ingress.yaml
error: unable to recognize "../../lab1_kubectl_version1/yaml/ingress.yaml": no matches for kind "Ingress" in version "extensions/v1beta1"

I think it's something like this now but it's not exactly correct:

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: guestbook-ingress
spec:
  rules:
  - host: frontend.minikube.local
    http:
      paths:
      - pathType: Prefix
        path: "/"
        backend:
          service:
            name: frontend
            port: 
              number: 80
  - host: backend.minikube.local
    http:
      paths:
      - pathType: Prefix
        path: "/"
        backend:
          service:
            name: backend
            port:
              number: 80
@phcollignon
Copy link
Owner

Hello, yes indeed, if you use recent K8s versions, you have to change the apiVersion from extension/v1beta to 'apiVersion: networking.k8s.io/v1'

@phcollignon
Copy link
Owner

Will be updated with the next PluralSight helm course release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants