static-pod example bad format in the final page (#6050)
* static-pod example bad format in the final page * static-pod example bad format in the final page * static-pod example bad format in the final page * static-pod example bad format in the final page * static-pod example bad format in the final pagepull/6028/merge
parent
94a6bbaeb2
commit
d9c61ab67d
|
@ -29,25 +29,25 @@ For example, this is how to start a simple web server as a static pod:
|
||||||
|
|
||||||
2. Choose a directory, say `/etc/kubelet.d` and place a web server pod definition there, e.g. `/etc/kubelet.d/static-web.yaml`:
|
2. Choose a directory, say `/etc/kubelet.d` and place a web server pod definition there, e.g. `/etc/kubelet.d/static-web.yaml`:
|
||||||
|
|
||||||
```
|
```shell
|
||||||
[root@my-node1 ~] $ mkdir /etc/kubelet.d/
|
[root@my-node1 ~] $ mkdir /etc/kubelet.d/
|
||||||
[root@my-node1 ~] $ cat <<EOF >/etc/kubelet.d/static-web.yaml
|
[root@my-node1 ~] $ cat <<EOF >/etc/kubelet.d/static-web.yaml
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Pod
|
kind: Pod
|
||||||
metadata:
|
metadata:
|
||||||
name: static-web
|
name: static-web
|
||||||
labels:
|
labels:
|
||||||
role: myrole
|
role: myrole
|
||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
|
- name: web
|
||||||
|
image: nginx
|
||||||
|
ports:
|
||||||
- name: web
|
- name: web
|
||||||
image: nginx
|
containerPort: 80
|
||||||
ports:
|
protocol: TCP
|
||||||
- name: web
|
EOF
|
||||||
containerPort: 80
|
```
|
||||||
protocol: TCP
|
|
||||||
EOF
|
|
||||||
```
|
|
||||||
|
|
||||||
3. Configure your kubelet daemon on the node to use this directory by running it with `--pod-manifest-path=/etc/kubelet.d/` argument.
|
3. Configure your kubelet daemon on the node to use this directory by running it with `--pod-manifest-path=/etc/kubelet.d/` argument.
|
||||||
On Fedora edit `/etc/kubernetes/kubelet` to include this line:
|
On Fedora edit `/etc/kubernetes/kubelet` to include this line:
|
||||||
|
|
Loading…
Reference in New Issue