Skip to content

Commit 1098ad8

Browse files
committed
Fix console syntax for highligting
1 parent 8cbe9c9 commit 1098ad8

File tree

1 file changed

+18
-18
lines changed

1 file changed

+18
-18
lines changed

docs/user-guide/debugging-services.md

+18-18
Original file line numberDiff line numberDiff line change
@@ -71,14 +71,14 @@ clear what is expected, this document will use the following conventions.
7171
If the command "COMMAND" is expected to run in a `Pod` and produce "OUTPUT":
7272

7373
```console
74-
pod$ COMMAND
74+
u@pod$ COMMAND
7575
OUTPUT
7676
```
7777

7878
If the command "COMMAND" is expected to run on a `Node` and produce "OUTPUT":
7979

8080
```console
81-
node$ COMMAND
81+
u@node$ COMMAND
8282
OUTPUT
8383
```
8484

@@ -187,14 +187,14 @@ have another `Pod` that consumes this `Service` by name you would get something
187187
like:
188188

189189
```console
190-
pod$ wget -qO- hostnames
190+
u@pod$ wget -qO- hostnames
191191
wget: bad address 'hostname'
192192
```
193193

194194
or:
195195

196196
```console
197-
pod$ echo $HOSTNAMES_SERVICE_HOST
197+
u@pod$ echo $HOSTNAMES_SERVICE_HOST
198198
199199
```
200200

@@ -246,7 +246,7 @@ Now you can confirm that the `Service` exists.
246246
From a `Pod` in the same `Namespace`:
247247

248248
```console
249-
pod$ nslookup hostnames
249+
u@pod$ nslookup hostnames
250250
Server: 10.0.0.10
251251
Address: 10.0.0.10#53
252252
@@ -258,7 +258,7 @@ If this fails, perhaps your `Pod` and `Service` are in different
258258
`Namespace`s, try a namespace-qualified name:
259259

260260
```console
261-
pod$ nslookup hostnames.default
261+
u@pod$ nslookup hostnames.default
262262
Server: 10.0.0.10
263263
Address: 10.0.0.10#53
264264
@@ -270,7 +270,7 @@ If this works, you'll need to ensure that `Pod`s and `Service`s run in the same
270270
`Namespace`. If this still fails, try a fully-qualified name:
271271

272272
```console
273-
pod$ nslookup hostnames.default.svc.cluster.local
273+
u@pod$ nslookup hostnames.default.svc.cluster.local
274274
Server: 10.0.0.10
275275
Address: 10.0.0.10#53
276276
@@ -286,7 +286,7 @@ You can also try this from a `Node` in the cluster (note: 10.0.0.10 is my DNS
286286
`Service`):
287287

288288
```console
289-
node$ nslookup hostnames.default.svc.cluster.local 10.0.0.10
289+
u@node$ nslookup hostnames.default.svc.cluster.local 10.0.0.10
290290
Server: 10.0.0.10
291291
Address: 10.0.0.10#53
292292
@@ -308,7 +308,7 @@ can take a step back and see what else is not working. The Kubernetes master
308308
`Service` should always work:
309309

310310
```console
311-
pod$ nslookup kubernetes.default
311+
u@pod$ nslookup kubernetes.default
312312
Server: 10.0.0.10
313313
Address 1: 10.0.0.10
314314
@@ -326,13 +326,13 @@ The next thing to test is whether your `Service` works at all. From a
326326
`Node` in your cluster, access the `Service`'s IP (from `kubectl get` above).
327327

328328
```console
329-
node$ curl 10.0.1.175:80
329+
u@node$ curl 10.0.1.175:80
330330
hostnames-0uton
331331
332-
node$ curl 10.0.1.175:80
332+
u@node$ curl 10.0.1.175:80
333333
hostnames-yp2kp
334334
335-
node$ curl 10.0.1.175:80
335+
u@node$ curl 10.0.1.175:80
336336
hostnames-bvc05
337337
```
338338

@@ -431,13 +431,13 @@ Let's check that the `Pod`s are actually working - we can bypass the `Service`
431431
mechanism and go straight to the `Pod`s.
432432

433433
```console
434-
pod$ wget -qO- 10.244.0.5:9376
434+
u@pod$ wget -qO- 10.244.0.5:9376
435435
hostnames-0uton
436436
437437
pod $ wget -qO- 10.244.0.6:9376
438438
hostnames-bvc05
439439
440-
pod$ wget -qO- 10.244.0.7:9376
440+
u@pod$ wget -qO- 10.244.0.7:9376
441441
hostnames-yp2kp
442442
```
443443

@@ -459,7 +459,7 @@ Confirm that `kube-proxy` is running on your `Node`s. You should get something
459459
like the below:
460460

461461
```console
462-
node$ ps auxw | grep kube-proxy
462+
u@node$ ps auxw | grep kube-proxy
463463
root 4194 0.4 0.1 101864 17696 ? Sl Jul04 25:43 /usr/local/bin/kube-proxy --master=https://kubernetes-master --kubeconfig=/var/lib/kube-proxy/kubeconfig --v=2
464464
```
465465

@@ -500,7 +500,7 @@ rules which implement `Service`s. Let's check that those rules are getting
500500
written.
501501

502502
```console
503-
node$ iptables-save | grep hostnames
503+
u@node$ iptables-save | grep hostnames
504504
-A KUBE-PORTALS-CONTAINER -d 10.0.1.175/32 -p tcp -m comment --comment "default/hostnames:default" -m tcp --dport 80 -j REDIRECT --to-ports 48577
505505
-A KUBE-PORTALS-HOST -d 10.0.1.175/32 -p tcp -m comment --comment "default/hostnames:default" -m tcp --dport 80 -j DNAT --to-destination 10.240.115.247:48577
506506
```
@@ -515,7 +515,7 @@ then look at the logs again.
515515
Assuming you do see the above rules, try again to access your `Service` by IP:
516516

517517
```console
518-
node$ curl 10.0.1.175:80
518+
u@node$ curl 10.0.1.175:80
519519
hostnames-0uton
520520
```
521521

@@ -525,7 +525,7 @@ using for your `Service`. In the above examples it is "48577". Now connect to
525525
that:
526526

527527
```console
528-
node$ curl localhost:48577
528+
u@node$ curl localhost:48577
529529
hostnames-yp2kp
530530
```
531531

0 commit comments

Comments
 (0)