Correcting minikube quickstart steps (#14355)
* Correcting minikube quickstart steps In minikube quickstart section , it was difficult to differentiate between command and its output. Also, There was no details given for each steps and its expected output. This PR fixes these issues. * Correcting number formatting Correcting number formatting * Correcting numbering Correcting numbering * Update content/en/docs/setup/minikube.md Co-Authored-By: Franklin Yu <franklinyu@hotmail.com> * Update content/en/docs/setup/minikube.md Co-Authored-By: Franklin Yu <franklinyu@hotmail.com> * Update content/en/docs/setup/minikube.md Co-Authored-By: Franklin Yu <franklinyu@hotmail.com> * Corrected formatting Corrected formatting * Correcting number sequence Correcting number sequence
This commit is contained in:
committed by
Kubernetes Prow Robot
parent
a7e4e00d51
commit
d135d566b1
@@ -45,103 +45,130 @@ Note that the IP below is dynamic and can change. It can be retrieved with `mini
|
|||||||
* vmware ([driver installation](https://github.com/kubernetes/minikube/blob/master/docs/drivers.md#vmware-unified-driver)) (VMware unified driver)
|
* vmware ([driver installation](https://github.com/kubernetes/minikube/blob/master/docs/drivers.md#vmware-unified-driver)) (VMware unified driver)
|
||||||
* none (Runs the Kubernetes components on the host and not in a VM. Using this driver requires Docker ([docker install](https://docs.docker.com/install/linux/docker-ce/ubuntu/)) and a Linux environment)
|
* none (Runs the Kubernetes components on the host and not in a VM. Using this driver requires Docker ([docker install](https://docs.docker.com/install/linux/docker-ce/ubuntu/)) and a Linux environment)
|
||||||
|
|
||||||
```shell
|
1. Start a minikube
|
||||||
minikube start
|
|
||||||
```
|
|
||||||
```
|
|
||||||
Starting local Kubernetes cluster...
|
|
||||||
Running pre-create checks...
|
|
||||||
Creating machine...
|
|
||||||
Starting local Kubernetes cluster...
|
|
||||||
```
|
|
||||||
```shell
|
|
||||||
kubectl run hello-minikube --image=k8s.gcr.io/echoserver:1.10 --port=8080
|
|
||||||
```
|
|
||||||
```
|
|
||||||
deployment.apps/hello-minikube created
|
|
||||||
```
|
|
||||||
|
|
||||||
```shell
|
```
|
||||||
kubectl expose deployment hello-minikube --type=NodePort
|
minikube start
|
||||||
```
|
```
|
||||||
```
|
The output shows that the kubernetes cluster is started:
|
||||||
service/hello-minikube exposed
|
|
||||||
```
|
|
||||||
|
|
||||||
We have now launched an echoserver pod but we have to wait until the pod is up before curling/accessing it
|
```
|
||||||
via the exposed service.
|
Starting local Kubernetes cluster...
|
||||||
To check whether the pod is up and running we can use the following:
|
Running pre-create checks...
|
||||||
|
Creating machine...
|
||||||
|
Starting local Kubernetes cluster...
|
||||||
|
```
|
||||||
|
|
||||||
```
|
2. Create an echo server deployment
|
||||||
kubectl get pod
|
|
||||||
```
|
|
||||||
```
|
|
||||||
NAME READY STATUS RESTARTS AGE
|
|
||||||
hello-minikube-3383150820-vctvh 0/1 ContainerCreating 0 3s
|
|
||||||
```
|
|
||||||
|
|
||||||
We can see that the pod is still being created from the ContainerCreating status
|
```
|
||||||
kubectl get pod
|
kubectl run hello-minikube --image=k8s.gcr.io/echoserver:1.10 --port=8080
|
||||||
|
```
|
||||||
|
The output of a successful command verifies that the deployment is created:
|
||||||
|
|
||||||
```
|
```
|
||||||
NAME READY STATUS RESTARTS AGE
|
deployment.apps/hello-minikube created
|
||||||
hello-minikube-3383150820-vctvh 1/1 Running 0 13s
|
```
|
||||||
```
|
|
||||||
|
|
||||||
We can see that the pod is now Running and we will now be able to curl it:
|
3. Expose an echo server deployment to create service
|
||||||
|
|
||||||
```
|
```
|
||||||
curl $(minikube service hello-minikube --url)
|
kubectl expose deployment hello-minikube --type=NodePort
|
||||||
```
|
```
|
||||||
```
|
The output of a successful command verifies that the service is created:
|
||||||
|
|
||||||
Hostname: hello-minikube-7c77b68cff-8wdzq
|
```
|
||||||
|
service/hello-minikube exposed
|
||||||
|
```
|
||||||
|
|
||||||
Pod Information:
|
4. Check whether the pod is up and running
|
||||||
-no pod information available-
|
|
||||||
|
|
||||||
Server values:
|
```
|
||||||
server_version=nginx: 1.13.3 - lua: 10008
|
kubectl get pod
|
||||||
|
```
|
||||||
|
The output displays the pod is still being created:
|
||||||
|
|
||||||
Request Information:
|
```
|
||||||
client_address=172.17.0.1
|
NAME READY STATUS RESTARTS AGE
|
||||||
method=GET
|
hello-minikube-3383150820-vctvh 0/1 ContainerCreating 0 3s
|
||||||
real path=/
|
```
|
||||||
query=
|
|
||||||
request_version=1.1
|
|
||||||
request_scheme=http
|
|
||||||
request_uri=http://192.168.99.100:8080/
|
|
||||||
|
|
||||||
Request Headers:
|
5. Wait for while and then check again, whether the pod is up and running using same command
|
||||||
accept=*/*
|
|
||||||
host=192.168.99.100:30674
|
|
||||||
user-agent=curl/7.47.0
|
|
||||||
|
|
||||||
Request Body:
|
```
|
||||||
-no body in request-
|
kubectl get pod
|
||||||
```
|
```
|
||||||
|
Now the output displays the pod is created and it is running:
|
||||||
|
|
||||||
```shell
|
```
|
||||||
kubectl delete services hello-minikube
|
NAME READY STATUS RESTARTS AGE
|
||||||
```
|
hello-minikube-3383150820-vctvh 1/1 Running 0 13s
|
||||||
```
|
```
|
||||||
service "hello-minikube" deleted
|
|
||||||
```
|
|
||||||
|
|
||||||
```shell
|
6. Curl service which we have created
|
||||||
kubectl delete deployment hello-minikube
|
|
||||||
```
|
|
||||||
```
|
|
||||||
deployment.extensions "hello-minikube" deleted
|
|
||||||
```
|
|
||||||
|
|
||||||
```shell
|
```
|
||||||
minikube stop
|
curl $(minikube service hello-minikube --url)
|
||||||
```
|
```
|
||||||
```
|
Output looks similer to this:
|
||||||
Stopping local Kubernetes cluster...
|
|
||||||
Stopping "minikube"...
|
```
|
||||||
```
|
Hostname: hello-minikube-7c77b68cff-8wdzq
|
||||||
|
|
||||||
|
Pod Information:
|
||||||
|
-no pod information available-
|
||||||
|
|
||||||
|
Server values:
|
||||||
|
server_version=nginx: 1.13.3 - lua: 10008
|
||||||
|
|
||||||
|
Request Information:
|
||||||
|
client_address=172.17.0.1
|
||||||
|
method=GET
|
||||||
|
real path=/
|
||||||
|
query=
|
||||||
|
request_version=1.1
|
||||||
|
request_scheme=http
|
||||||
|
request_uri=http://192.168.99.100:8080/
|
||||||
|
|
||||||
|
Request Headers:
|
||||||
|
accept=*/*
|
||||||
|
host=192.168.99.100:30674
|
||||||
|
user-agent=curl/7.47.0
|
||||||
|
|
||||||
|
Request Body:
|
||||||
|
-no body in request-
|
||||||
|
```
|
||||||
|
7. Delete the service which we have created
|
||||||
|
|
||||||
|
```
|
||||||
|
kubectl delete services hello-minikube
|
||||||
|
```
|
||||||
|
The output of a successful command verifies that the service is deleted:
|
||||||
|
|
||||||
|
```
|
||||||
|
service "hello-minikube" deleted
|
||||||
|
```
|
||||||
|
8. Delete the deployment which we have created
|
||||||
|
|
||||||
|
```
|
||||||
|
kubectl delete deployment hello-minikube
|
||||||
|
```
|
||||||
|
The output of a successful command verifies that the deployment is deleted:
|
||||||
|
|
||||||
|
```
|
||||||
|
deployment.extensions "hello-minikube" deleted
|
||||||
|
```
|
||||||
|
9. Stop a minikube
|
||||||
|
|
||||||
|
```
|
||||||
|
minikube stop
|
||||||
|
```
|
||||||
|
The output displays the kubernetes cluster is stopping:
|
||||||
|
|
||||||
|
```
|
||||||
|
Stopping local Kubernetes cluster...
|
||||||
|
Stopping "minikube"...
|
||||||
|
```
|
||||||
|
|
||||||
### Alternative Container Runtimes
|
### Alternative Container Runtimes
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user