Skip to content

Commit 7a98007

Browse files
committed
update tabs shortcode
1 parent de78f49 commit 7a98007

File tree

3 files changed

+198
-144
lines changed

3 files changed

+198
-144
lines changed

content/en/docs/setup/learning-environment/minikube.md

Lines changed: 122 additions & 87 deletions
Original file line numberDiff line numberDiff line change
@@ -37,116 +37,151 @@ See [Installing Minikube](/docs/tasks/tools/install-minikube/).
3737
This brief demo guides you on how to start, use, and delete Minikube locally. Follow the steps given below to start and explore Minikube.
3838

3939
1. Start Minikube and create a cluster:
40-
```shell
40+
41+
```shell
4142
minikube start
42-
```
43-
The output is similar to this:
43+
```
4444

45-
```
46-
Starting local Kubernetes cluster...
47-
Running pre-create checks...
48-
Creating machine...
49-
Starting local Kubernetes cluster...
50-
```
51-
For more information on starting your cluster on a specific Kubernetes version, VM, or container runtime, see [Starting a Cluster](#starting-a-cluster).
45+
The output is similar to this:
46+
47+
```
48+
Starting local Kubernetes cluster...
49+
Running pre-create checks...
50+
Creating machine...
51+
Starting local Kubernetes cluster...
52+
```
53+
54+
For more information on starting your cluster on a specific Kubernetes version, VM, or container runtime, see [Starting a Cluster](#starting-a-cluster).
5255

5356
2. Now, you can interact with your cluster using kubectl. For more information, see [Interacting with Your Cluster](#interacting-with-your-cluster).
5457

55-
Let’s create a Kubernetes Deployment using an existing image named `echoserver`, which is a simple HTTP server and expose it on port 8080 using `--port`.
56-
```shell
57-
kubectl create deployment hello-minikube --image=k8s.gcr.io/echoserver:1.10
58-
```
59-
The output is similar to this:
60-
```
61-
deployment.apps/hello-minikube created
62-
```
58+
Let’s create a Kubernetes Deployment using an existing image named `echoserver`, which is a simple HTTP server and expose it on port 8080 using `--port`.
59+
60+
```shell
61+
kubectl create deployment hello-minikube --image=k8s.gcr.io/echoserver:1.10
62+
```
63+
64+
The output is similar to this:
65+
66+
```
67+
deployment.apps/hello-minikube created
68+
```
6369
3. To access the `hello-minikube` Deployment, expose it as a Service:
64-
```shell
65-
kubectl expose deployment hello-minikube --type=NodePort --port=8080
66-
```
67-
The option `--type=NodePort` specifies the type of the Service.
6870

69-
The output is similar to this:
70-
```
71-
service/hello-minikube exposed
72-
```
71+
```shell
72+
kubectl expose deployment hello-minikube --type=NodePort --port=8080
73+
```
74+
75+
The option `--type=NodePort` specifies the type of the Service.
76+
77+
The output is similar to this:
78+
79+
```
80+
service/hello-minikube exposed
81+
```
82+
7383
4. The `hello-minikube` Pod is now launched but you have to wait until the Pod is up before accessing it via the exposed Service.
7484

75-
Check if the Pod is up and running:
76-
```shell
77-
kubectl get pod
78-
```
79-
If the output shows the `STATUS` as `ContainerCreating`, the Pod is still being created:
80-
```
81-
NAME READY STATUS RESTARTS AGE
82-
hello-minikube-3383150820-vctvh 0/1 ContainerCreating 0 3s
83-
```
84-
If the output shows the `STATUS` as `Running`, the Pod is now up and running:
85-
```
86-
NAME READY STATUS RESTARTS AGE
87-
hello-minikube-3383150820-vctvh 1/1 Running 0 13s
88-
```
85+
Check if the Pod is up and running:
86+
87+
```shell
88+
kubectl get pod
89+
```
90+
91+
If the output shows the `STATUS` as `ContainerCreating`, the Pod is still being created:
92+
93+
```
94+
NAME READY STATUS RESTARTS AGE
95+
hello-minikube-3383150820-vctvh 0/1 ContainerCreating 0 3s
96+
```
97+
98+
If the output shows the `STATUS` as `Running`, the Pod is now up and running:
99+
100+
```
101+
NAME READY STATUS RESTARTS AGE
102+
hello-minikube-3383150820-vctvh 1/1 Running 0 13s
103+
```
104+
89105
5. Get the URL of the exposed Service to view the Service details:
90-
```shell
91-
minikube service hello-minikube --url
92-
```
106+
107+
```shell
108+
minikube service hello-minikube --url
109+
```
110+
93111
6. To view the details of your local cluster, copy and paste the URL you got as the output, on your browser.
94112

95-
The output is similar to this:
96-
```
97-
Hostname: hello-minikube-7c77b68cff-8wdzq
113+
The output is similar to this:
98114

99-
Pod Information:
100-
-no pod information available-
115+
```
116+
Hostname: hello-minikube-7c77b68cff-8wdzq
101117
102-
Server values:
103-
server_version=nginx: 1.13.3 - lua: 10008
118+
Pod Information:
119+
-no pod information available-
104120
105-
Request Information:
106-
client_address=172.17.0.1
107-
method=GET
108-
real path=/
109-
query=
110-
request_version=1.1
111-
request_scheme=http
112-
request_uri=http://192.168.99.100:8080/
121+
Server values:
122+
server_version=nginx: 1.13.3 - lua: 10008
113123
114-
Request Headers:
124+
Request Information:
125+
client_address=172.17.0.1
126+
method=GET
127+
real path=/
128+
query=
129+
request_version=1.1
130+
request_scheme=http
131+
request_uri=http://192.168.99.100:8080/
132+
133+
Request Headers:
115134
accept=*/*
116135
host=192.168.99.100:30674
117136
user-agent=curl/7.47.0
118137
119-
Request Body:
138+
Request Body:
120139
-no body in request-
121-
```
122-
If you no longer want the Service and cluster to run, you can delete them.
140+
```
141+
142+
If you no longer want the Service and cluster to run, you can delete them.
143+
123144
7. Delete the `hello-minikube` Service:
124-
```shell
125-
kubectl delete services hello-minikube
126-
```
127-
The output is similar to this:
128-
```
129-
service "hello-minikube" deleted
130-
```
145+
146+
```shell
147+
kubectl delete services hello-minikube
148+
```
149+
150+
The output is similar to this:
151+
152+
```
153+
service "hello-minikube" deleted
154+
```
155+
131156
8. Delete the `hello-minikube` Deployment:
132-
```shell
133-
kubectl delete deployment hello-minikube
134-
```
135-
The output is similar to this:
136-
```
137-
deployment.extensions "hello-minikube" deleted
138-
```
157+
158+
```shell
159+
kubectl delete deployment hello-minikube
160+
```
161+
162+
The output is similar to this:
163+
164+
```
165+
deployment.extensions "hello-minikube" deleted
166+
```
167+
139168
9. Stop the local Minikube cluster:
140-
```shell
141-
minikube stop
142-
```
143-
The output is similar to this:
144-
```
145-
Stopping "minikube"...
146-
"minikube" stopped.
147-
```
148-
For more information, see [Stopping a Cluster](#stopping-a-cluster).
169+
170+
```shell
171+
minikube stop
172+
```
173+
174+
The output is similar to this:
175+
176+
```
177+
Stopping "minikube"...
178+
"minikube" stopped.
179+
```
180+
181+
For more information, see [Stopping a Cluster](#stopping-a-cluster).
182+
149183
10. Delete the local Minikube cluster:
184+
150185
```shell
151186
minikube delete
152187
```
@@ -193,8 +228,8 @@ For example the command would be.
193228
minikube start --driver=<driver_name>
194229
```
195230
Minikube supports the following drivers:
196-
{{< note >}}
197-
See [DRIVERS](https://minikube.sigs.k8s.io/docs/reference/drivers/) for details on supported drivers and how to install
231+
{{< note >}}
232+
See [DRIVERS](https://minikube.sigs.k8s.io/docs/reference/drivers/) for details on supported drivers and how to install
198233
plugins.
199234
{{< /note >}}
200235

0 commit comments

Comments
 (0)