Skip to content

Commit 24f3b7a

Browse files
author
Mercurio
committed
Improve docs in module4
1 parent 3571802 commit 24f3b7a

7 files changed

+61
-36
lines changed

module4/1.simple-pod.MD

+20-11
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,32 @@
1+
## Simple pod demo
12

2-
## simple pod demo
3-
### run nginx as webserver
4-
```
3+
### Run nginx as webserver
4+
5+
```shell
56
$ kubectl run --image=nginx nginx
67
$ kubectl run --image=nginx nginx --restart='Always'
78
```
8-
### show running pod
9-
```
9+
10+
### Show running pod
11+
12+
```shell
1013
$ kubectl get po --show-labels -owide -w
1114
```
12-
### expose svc
13-
```
15+
16+
### Expose svc
17+
18+
```shell
1419
$ kubectl expose deploy nginx --selector run=nginx --port=80 --type=NodePort
1520
```
16-
### check svc detail
17-
```
21+
22+
### Check svc detail
23+
24+
```shell
1825
$ kubectl get svc
1926
```
20-
### access service
21-
```
27+
28+
### Access service
29+
30+
```shell
2231
$ curl 192.168.34.2:<nodeport>
2332
```

module4/2.run-envoy-with-configmap.MD

+15-6
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,27 @@
1-
## run envoy
2-
```
1+
## Run envoy
2+
3+
```shell
34
$ kubectl create configmap envoy-config --from-file=envoy.yaml
45
$ kubectl create -f envoy-deploy.yaml
56
$ kubectl expose deploy envoy --selector run=envoy --port=10000 --type=NodePort
67
```
7-
## access service
8-
```
8+
9+
## Access service
10+
11+
```shell
912
$ curl <NODE IP Address>:<NodePort>
13+
```
14+
1015
Notices: Node IP Address base on your kubernetes cluster.
1116

1217
Example:
18+
19+
```shell
1320
$ curl 192.168.34.2:<nodeport>
1421
```
15-
## scale up/down/failover
16-
```
22+
23+
## Scale up/down/failover
24+
25+
```shell
1726
$ kubectl scale deploy <deployment-name> --replicas=<n>
1827
```

module4/3.understand-configmap.MD

+8-5
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,20 @@
1-
# configmap
2-
```
1+
# ConfigMap
2+
3+
```sh
34
cat game.properties
45

56
#configmap from file
67
kubectl create configmap game-config --from-file=game.properties
78
kubectl create configmap game-env-config --from-env-file=game.properties
89
kubectl get configmap -oyaml game-config
910
```
10-
## configmap from literal
11-
```
11+
12+
## ConfigMap from literal
13+
14+
```sh
1215
kubectl create configmap special-config --from-literal=special.how=very --from-literal=special.type=charm
1316
#downward api pod
1417
kubectl create -f downward-api-pod.yaml
1518
kubectl get po downward-api-pod
1619
kubectl logs -f downward-api-pod
17-
```
20+
```

module4/4.configmap-volume.MD

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
# volume
2-
```
1+
# Volume
2+
3+
```sh
34
kubectl create -f configmap-volume-pod.yaml
45
kubectl get po
56
kubectl logs -f configmap-volume-pod
6-
```
7+
```

module4/5.readiness-probe.MD

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
# readiness probe
2-
```
1+
# Readiness probe
2+
3+
```sh
34
kubectl create -f centos-readiness.yaml
4-
```
5+
```

module4/6.get-obj-columns.MD

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
## get object by columns
1+
## Get object by columns
2+
3+
```sh
4+
kubectl get svc -o=custom-columns=NAME:.metadata.name,CREATED:'.metadata.annotations'
25
```
3-
kubectl get svc -o=custom-columns=NAME:.metadata.name,CREATED:'.metadata.annotations'
4-
```

module4/readme.md

+6-5
Original file line numberDiff line numberDiff line change
@@ -11,22 +11,23 @@
1111

1212
#### Envoy
1313

14-
- [中文介绍](https://cloudnative.to/blog/what-is-envoy/)
14+
- [中文介绍](https://cloudnative.to/blog/what-is-envoy/)
1515

16-
- [中文翻译文档](https://cloudnative.to/envoy/intro/intro.html)
16+
- [中文翻译文档](https://cloudnative.to/envoy/intro/intro.html)
1717

18-
官方资料
18+
#### 官方资料
1919

2020
- [英文文档](https://www.envoyproxy.io/docs/envoy/latest/intro/what_is_envoy)
2121

2222
- [sandboxes (新手入门必须试试)](https://www.envoyproxy.io/docs/envoy/latest/start/sandboxes/)
2323

24-
博客
24+
#### 博客
25+
2526
- FuckCloudNative
2627
- https://fuckcloudnative.io/tags/envoy/page/2/
2728
- https://fuckcloudnative.io/tags/envoy/page/1/
2829

29-
### Kubernetes
30+
### Kubernetes
3031

3132
- [Architecting Kubernetes clusters — choosing a worker node size](https://learnk8s.io/kubernetes-node-size)
3233

0 commit comments

Comments
 (0)