This is a Bug Report
Problem:
When following the instructions to execute kubectl run hello-minikube --image=k8s.gcr.io/echoserver:1.10 --port=8080
The command emits the following warning:
$ kubectl run hello-minikube --image=k8s.gcr.io/echoserver:1.10 --port=8080
kubectl run --generator=deployment/apps.v1 is DEPRECATED and will be removed in a future version. Use kubectl run --generator=run-pod/v1 or kubectl create instead.
deployment.apps/hello-minikube created
Proposed Solution:
Follow the warning to update the document to use one of the proposed new commands. Since I'm new to K8s I'm not sure which one it should be.
Page to Update:
https://kubernetes.io/docs/setup/learning-environment/minikube/
$ kubectl version
Client Version: version.Info{Major:"1", Minor:"15", GitVersion:"v1.15.1", GitCommit:"4485c6f18cee9a5d3c3b4e523bd27972b1b53892", GitTreeState:"clean", BuildDate:"2019-07-18T09:18:22Z", GoVersion:"go1.12.5", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"15", GitVersion:"v1.15.2", GitCommit:"f6278300bebbb750328ac16ee6dd3aa7d3549568", GitTreeState:"clean", BuildDate:"2019-08-05T09:15:22Z", GoVersion:"go1.12.5", Compiler:"gc", Platform:"linux/amd64"}
/assign @RA489
This only an issue with the API version, and not the syntax itself (currently).
@amosshapira Try this command as workaround.
kubectl run --generator=run-pod/v1 hello-minikube --image=k8s.gcr.io/echoserver:1.10 --port=8080
Yep, that executed cleanly:
$ kubectl run --generator=run-pod/v1 hello-minikube --image=k8s.gcr.io/echoserver:1.10 --port=8080
pod/hello-minikube created
BTW I just noticed that, probably because the updated command doesn't create deployment but just a pod, the next command on the manual also fails:
$ kubectl expose deployment hello-minikube --type=NodePort
Error from server (NotFound): deployments.extensions "hello-minikube" not found
So it starts feeling like either the entire page have to be revamped or a different command should be used for the step I reported initially.
@amosshapira Please try this as workaround.
kubectl create deployment hello-minikube --image=k8s.gcr.io/echoserver:1.4
Expose it as a Service use this command
kubectl expose deployment hello-minikube --port=8080
Think this is resolved via PR #16533
/close
@sftim: Closing this issue.
In response to this:
Think this is resolved via PR #16533
/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.
Thank you.
This is a Bug Report
Problem:
When following the instructions to executekubectl run hello-minikube --image=k8s.gcr.io/echoserver:1.10 --port=8080The command emits the following warning:
$ kubectl run hello-minikube --image=k8s.gcr.io/echoserver:1.10 --port=8080 kubectl run --generator=deployment/apps.v1 is DEPRECATED and will be removed in a future version. Use kubectl run --generator=run-pod/v1 or kubectl create instead. deployment.apps/hello-minikube createdProposed Solution:
Follow the warning to update the document to use one of the proposed new commands. Since I'm new to K8s I'm not sure which one it should be.Page to Update:
https://kubernetes.io/docs/setup/learning-environment/minikube/$ kubectl version Client Version: version.Info{Major:"1", Minor:"15", GitVersion:"v1.15.1", GitCommit:"4485c6f18cee9a5d3c3b4e523bd27972b1b53892", GitTreeState:"clean", BuildDate:"2019-07-18T09:18:22Z", GoVersion:"go1.12.5", Compiler:"gc", Platform:"linux/amd64"} Server Version: version.Info{Major:"1", Minor:"15", GitVersion:"v1.15.2", GitCommit:"f6278300bebbb750328ac16ee6dd3aa7d3549568", GitTreeState:"clean", BuildDate:"2019-08-05T09:15:22Z", GoVersion:"go1.12.5", Compiler:"gc", Platform:"linux/amd64"}
Use this command : kubectl create deployment hello-minikube --image=k8s.gcr.io/echoserver:1.4
and then use: kubectl get deployments
Most helpful comment
BTW I just noticed that, probably because the updated command doesn't create deployment but just a pod, the next command on the manual also fails:
So it starts feeling like either the entire page have to be revamped or a different command should be used for the step I reported initially.