Skip to content

Commit e3521a8

Browse files
committed
Merge pull request kubernetes#11548 from a-robinson/admin
Improve admin docs syntax highlighting
2 parents 91923b5 + 3364a32 commit e3521a8

File tree

10 files changed

+30
-28
lines changed

10 files changed

+30
-28
lines changed

docs/admin/cluster-large.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -68,14 +68,14 @@ To prevent memory leaks or other resource issues in [cluster addons](../../clust
6868

6969
For example:
7070

71-
```YAML
72-
containers:
73-
- image: gcr.io/google_containers/heapster:v0.15.0
74-
name: heapster
75-
resources:
76-
limits:
77-
cpu: 100m
78-
memory: 200Mi
71+
```yaml
72+
containers:
73+
- image: gcr.io/google_containers/heapster:v0.15.0
74+
name: heapster
75+
resources:
76+
limits:
77+
cpu: 100m
78+
memory: 200Mi
7979
```
8080
8181
These limits, however, are based on data collected from addons running on 4-node clusters (see [#10335](https://github.com/GoogleCloudPlatform/kubernetes/issues/10335#issuecomment-117861225)). The addons consume a lot more resources when running on large deployment clusters (see [#5880](https://github.com/GoogleCloudPlatform/kubernetes/issues/5880#issuecomment-113984085)). So, if a large cluster is deployed without adjusting these values, the addons may continuously get killed because they keep hitting the limits.

docs/admin/cluster-management.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ KUBE_API_VERSIONS env var controls the API versions that are supported in the cl
6262

6363
You can use the kube-version-change utility to convert config files between different API versions.
6464

65-
```
65+
```console
6666
$ hack/build-go.sh cmd/kube-version-change
6767
$ _output/local/go/bin/kube-version-change -i myPod.v1beta3.yaml -o myPod.v1.yaml
6868
```

docs/admin/cluster-troubleshooting.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ The first thing to debug in your cluster is if your nodes are all registered cor
4444

4545
Run
4646

47-
```
47+
```sh
4848
kubectl get nodes
4949
```
5050

docs/admin/etcd.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ To test whether `etcd` is running correctly, you can try writing a value to a
7373
test key. On your master VM (or somewhere with firewalls configured such that
7474
you can talk to your cluster's etcd), try:
7575

76-
```
76+
```sh
7777
curl -fs -X PUT "http://${host}:${port}/v2/keys/_test"
7878
```
7979

docs/admin/high-availability.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -141,13 +141,13 @@ for ```${NODE_IP}``` on each machine.
141141

142142
Once you copy this into all three nodes, you should have a clustered etcd set up. You can validate with
143143

144-
```
144+
```sh
145145
etcdctl member list
146146
```
147147

148148
and
149149

150-
```
150+
```sh
151151
etcdctl cluster-health
152152
```
153153

@@ -179,7 +179,7 @@ Once you have replicated etcd set up correctly, we will also install the apiserv
179179

180180
First you need to create the initial log file, so that Docker mounts a file instead of a directory:
181181

182-
```
182+
```sh
183183
touch /var/log/kube-apiserver.log
184184
```
185185

@@ -231,7 +231,7 @@ In the future, we expect to more tightly integrate this lease-locking into the s
231231

232232
First, create empty log files on each node, so that Docker will mount the files not make new directories:
233233

234-
```
234+
```sh
235235
touch /var/log/kube-scheduler.log
236236
touch /var/log/kube-controller-manager.log
237237
```

docs/admin/networking.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ on that subnet, and is passed to docker's `--bridge` flag.
155155

156156
We start Docker with:
157157

158-
```
158+
```sh
159159
DOCKER_OPTS="--bridge=cbr0 --iptables=false --ip-masq=false"
160160
```
161161

@@ -172,14 +172,14 @@ masquerade (aka SNAT - to make it seem as if packets came from the `Node`
172172
itself) traffic that is bound for IPs outside the GCE project network
173173
(10.0.0.0/8).
174174

175-
```
175+
```sh
176176
iptables -t nat -A POSTROUTING ! -d 10.0.0.0/8 -o eth0 -j MASQUERADE
177177
```
178178

179179
Lastly we enable IP forwarding in the kernel (so the kernel will process
180180
packets for bridged containers):
181181

182-
```
182+
```sh
183183
sysctl net.ipv4.ip_forward=1
184184
```
185185

docs/admin/node.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ node, but will not affect any existing pods on the node. This is useful as a
209209
preparatory step before a node reboot, etc. For example, to mark a node
210210
unschedulable, run this command:
211211

212-
```
212+
```sh
213213
kubectl replace nodes 10.1.2.3 --patch='{"apiVersion": "v1", "unschedulable": true}'
214214
```
215215

@@ -228,7 +228,7 @@ processes not in containers.
228228
If you want to explicitly reserve resources for non-Pod processes, you can create a placeholder
229229
pod. Use the following template:
230230

231-
```
231+
```yaml
232232
apiVersion: v1
233233
kind: Pod
234234
metadata:

docs/admin/resource-quota.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ This means the resource must have a fully-qualified name (i.e. mycompany.org/shi
8989

9090
Kubectl supports creating, updating, and viewing quotas
9191

92-
```
92+
```console
9393
$ kubectl namespace myspace
9494
$ cat <<EOF > quota.json
9595
{

docs/admin/salt.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ The **salt-minion** service runs on the kubernetes-master node and each kubernet
4545

4646
Each salt-minion service is configured to interact with the **salt-master** service hosted on the kubernetes-master via the **master.conf** file [(except on GCE)](#standalone-salt-configuration-on-gce).
4747

48-
```
48+
```console
4949
[root@kubernetes-master] $ cat /etc/salt/minion.d/master.conf
5050
master: kubernetes-master
5151
```
@@ -66,7 +66,7 @@ All remaining sections that refer to master/minion setups should be ignored for
6666

6767
Security is not enabled on the salt-master, and the salt-master is configured to auto-accept incoming requests from minions. It is not recommended to use this security configuration in production environments without deeper study. (In some environments this isn't as bad as it might sound if the salt master port isn't externally accessible and you trust everyone on your network.)
6868

69-
```
69+
```console
7070
[root@kubernetes-master] $ cat /etc/salt/master.d/auto-accept.conf
7171
open_mode: True
7272
auto_accept: True
@@ -78,7 +78,7 @@ Each minion in the salt cluster has an associated configuration that instructs t
7878

7979
An example file is presented below using the Vagrant based environment.
8080

81-
```
81+
```console
8282
[root@kubernetes-master] $ cat /etc/salt/minion.d/grains.conf
8383
grains:
8484
etcd_servers: $MASTER_IP

docs/admin/service-accounts-admin.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ account. To create additional API tokens for a service account, create a secret
9393
of type `ServiceAccountToken` with an annotation referencing the service
9494
account, and the controller will update it with a generated token:
9595

96-
```
96+
```json
9797
secret.json:
9898
{
9999
"kind": "Secret",
@@ -105,14 +105,16 @@ secret.json:
105105
}
106106
"type": "kubernetes.io/service-account-token"
107107
}
108+
```
108109

109-
$ kubectl create -f ./secret.json
110-
$ kubectl describe secret mysecretname
110+
```sh
111+
kubectl create -f ./secret.json
112+
kubectl describe secret mysecretname
111113
```
112114

113115
#### To delete/invalidate a service account token
114116

115-
```
117+
```sh
116118
kubectl delete secret mysecretname
117119
```
118120

0 commit comments

Comments
 (0)