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

Issue with k8s.io/docs/setup/learning-environment/minikube/ #15728

Closed
amosshapira opened this issue Aug 7, 2019 · 11 comments
Closed

Issue with k8s.io/docs/setup/learning-environment/minikube/ #15728

amosshapira opened this issue Aug 7, 2019 · 11 comments
Assignees

Comments

@amosshapira
Copy link
Contributor

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"}
@RA489
Copy link

RA489 commented Aug 8, 2019

/assign @RA489

@thecrudge
Copy link
Contributor

thecrudge commented Aug 10, 2019

This only an issue with the API version, and not the syntax itself (currently).

@RA489
Copy link

RA489 commented Aug 11, 2019

@amosshapira Try this command as workaround.
kubectl run --generator=run-pod/v1 hello-minikube --image=k8s.gcr.io/echoserver:1.10 --port=8080

@amosshapira
Copy link
Contributor Author

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

@amosshapira
Copy link
Contributor Author

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.

@RA489
Copy link

RA489 commented Aug 13, 2019

@amosshapira Please try this as workaround.
kubectl create deployment hello-minikube --image=k8s.gcr.io/echoserver:1.4

@RA489
Copy link

RA489 commented Aug 13, 2019

Expose it as a Service use this command
kubectl expose deployment hello-minikube --port=8080

@sftim
Copy link
Contributor

sftim commented Oct 4, 2019

Think this is resolved via PR #16533
/close

@k8s-ci-robot
Copy link
Contributor

@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.

@amossc
Copy link

amossc commented Oct 4, 2019

Thank you.

@chandrabhShukla
Copy link

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"}

Use this command : kubectl create deployment hello-minikube --image=k8s.gcr.io/echoserver:1.4
and then use: kubectl get deployments

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

Successfully merging a pull request may close this issue.

7 participants