This is a Bug Report
Problem: Tried using the interactive minikube website and ran into issues. Specefically when running kubectl apply -f example-ingress.yaml . I am following https://kubernetes.io/docs/tasks/access-application-cluster/ingress-minikube/
I received
$ kubectl apply -f example-ingress.yaml
error: unable to recognize "example-ingress.yaml": no matches for kind "Ingress" in version "networking.k8s.io/v1beta1"
Proposed Solution:
The solution that worked for me was to use the old api version of apiVersion: extensions/v1beta1
My full example-ingress.yaml file is
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: example-ingress
annotations:
nginx.ingress.kubernetes.io/rewrite-target: /
spec:
rules:
- host: hello-world.info
http:
paths:
- path: /*
backend:
serviceName: web
servicePort: 8080
Maybe there's a better solution, but this worked for me.
Page to Update:
https://kubernetes.io/docs/tasks/access-application-cluster/ingress-minikube/
https://github.com/kubernetes/website/pull/14239/files was the PR that changed them all. I'm sure there was a reason to change them!
My guess is that you're looking at the latest documentation, whilst using an older Kubernetes version.
Does that explain what's happened?
I'm using the minikube available via the "Launch terminal" window on the web page at https://kubernetes.io/docs/tasks/access-application-cluster/ingress-minikube/
minikube version: v0.34.1
Kubernetes v1.13.3
Is there a different place we should go to to request the kubernetes version get updated on the documentation page?
You can find documentation for Kubernetes v1.13 at https://v1-13.docs.kubernetes.io/
so that page would be https://v1-13.docs.kubernetes.io/docs/tasks/access-application-cluster/ingress-minikube/
It's based on a snapshot of the documentation from just before v1.14 came out. If there's something not right, even in older versions of the documentation, that absolutely can be logged as an issue.
Does that help?
/triage support
The latest version also has the same issue as I reported, it looks to be due to the wrong version of kubernetes being loaded. v1.13.3 is being loaded even though the documentation is for v1.14.*
Page: https://kubernetes.io/docs/tasks/access-application-cluster/ingress-minikube/
minikube version; minikube start
$
$ minikube version; minikube start
minikube version: v0.34.1
o minikube v0.34.1 on linux (amd64)
> Configuring local host environment ...
> Creating none VM (CPUs=2, Memory=2048MB, Disk=20000MB) ...
- "minikube" IP address is 172.17.0.8
- Configuring Docker as the container runtime ...
- Preparing Kubernetes environment ...
@ Downloading kubeadm v1.13.3
@ Downloading kubelet v1.13.3
- Pulling images required by Kubernetes v1.13.3 ...
- Launching Kubernetes v1.13.3 using kubeadm ...
- Configuring cluster permissions ...
- Verifying component health .....
+ kubectl is now configured to use "minikube"
= Done! Thank you for using minikube!
$ vim example-ingress.yaml
$ kubectl apply -f example-ingress.yaml
error: unable to recognize "example-ingress.yaml": no matches for kind "Ingress" in version "networking.k8s.io/v1beta1"
$ cat example-ingress.yaml
apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
name: example-ingress
annotations:
nginx.ingress.kubernetes.io/rewrite-target: /
spec:
rules:
- host: hello-world.info
http:
paths:
- path: /*
backend:
serviceName: web
servicePort: 8080
$
Should I change the issue name to something else or submit a separate issue about the terminal loading the wrong version of kubernetes?
I verified that v1-13 does have a different issue now, submitted via a separate issue https://github.com/kubernetes/website/issues/14447
Fixed in PR #14449 Issue is wrong api version
/close
@thecrudge: Closing this issue.
In response to this:
Fixed in PR #14449 Issue is wrong api version
/close
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.