You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-[Setting up the master node](#setting-up-the-master-node)
13
14
-[Setting up the minion nodes](#setting-up-the-minion-nodes)
14
-
-[Setting up CNI network routes](#setting-up-cni-network-routes)
15
15
-[Run and Verify](#run-and-verify)
16
16
-[Troubleshooting](#troubleshooting)
17
17
@@ -25,15 +25,14 @@ This document shows how to easily install a Kubernetes cluster with Pouch as the
25
25
26
26
Kubernetes: Version 1.5+ is recommanded.
27
27
28
-
Pouch: Version 0.4.0 is recommended.
28
+
NOTE: PouchContainer version prior to 0.5.x (including version 0.5.0) did not support configuring CNI network plugin with flannel. If you want to do that, use the latest code from the branch of master, refer to [Developer Quick-Start](https://github.com/alibaba/pouch/blob/master/INSTALLATION.md#developer-quick-start)
29
29
30
30
## Install and Configure
31
31
32
32
An all-in-one kubernetes cluster with pouch runtime could be deployed by running:
33
33
34
34
```
35
35
hack/kubernetes/allinone.sh
36
-
37
36
```
38
37
39
38
Please refer to [allinone](https://github.com/alibaba/pouch/blob/master/hack/kubernetes/allinone.sh) .
@@ -46,21 +45,27 @@ You can easily setup a basic Pouch environment, see [INSTALLATION.md](../../INST
46
45
47
46
On Ubuntu 16.04+:
48
47
48
+
NOTE: If you'd like to use Kubernetes 1.10+, CRI_VERSION should be "v1alpha2"
49
+
49
50
```
50
-
sed -i 's/ExecStart=\/usr\/bin\/pouchd/ExecStart=\/usr\/bin\/pouchd --enable-cri=true/g' /usr/lib/systemd/system/pouch.service
51
+
CRI_VERSION="v1alpha1"
52
+
sed -i 's/ExecStart=\/usr\/bin\/pouchd/ExecStart=\/usr\/bin\/pouchd --enable-cri=true --cri-version=${CRI_VERSION}/g' /usr/lib/systemd/system/pouch.service
51
53
systemctl daemon-reload
52
54
systemctl restart pouch
53
55
```
54
56
55
57
On CentOS 7:
56
58
59
+
NOTE: If you'd like to use Kubernetes 1.10+, CRI_VERSION should be "v1alpha2"
60
+
57
61
```
58
-
sed -i 's/ExecStart=\/usr\/local\/bin\/pouchd/ExecStart=\/usr\/local\/bin\/pouchd --enable-cri=true/g' /lib/systemd/system/pouch.service
62
+
CRI_VERSION="v1alpha1"
63
+
sed -i 's/ExecStart=\/usr\/local\/bin\/pouchd/ExecStart=\/usr\/local\/bin\/pouchd --enable-cri=true --cri-version=${CRI_VERSION}/g' /lib/systemd/system/pouch.service
For more details, please check [install kubelet](https://kubernetes.io/docs/setup/independent/install-kubeadm/#installing-kubeadm-kubelet-and-kubectl).
149
120
121
+
### Install CNI
122
+
123
+
On Ubuntu 16.04+:
124
+
125
+
```
126
+
apt-get install -y kubernetes-cni
127
+
```
128
+
129
+
On CentOS 7:
130
+
131
+
```
132
+
setenforce 0
133
+
yum install -y kubernetes-cni
134
+
```
135
+
150
136
### Setting up the master node
151
137
152
138
For more detailed Kubernetes cluster installation, please check [Using kubeadm to Create a Cluster](https://kubernetes.io/docs/setup/independent/create-cluster-kubeadm/)
NOTE: If you want to use CNI plugin other than bridge, please check [Installing a pod network](https://kubernetes.io/docs/setup/independent/create-cluster-kubeadm/#pod-network).
156
+
NOTE: For other plugins, please check [Installing a pod network](https://kubernetes.io/docs/setup/independent/create-cluster-kubeadm/#pod-network).
If your CNI plugin is bridge, you could use direct routes to connect the containers across multi-node.Suppose you have one master node and one minion node:
183
-
184
-
```
185
-
NODE IP_ADDRESS CONTAINER_CIDR
186
-
master 10.148.0.1 10.244.1.0/24
187
-
minion 10.148.0.2 10.244.2.0/24
188
-
```
189
-
190
-
Setting up routes:
175
+
NOTE: Because kubeadm still assumes docker as the only container runtime ,Use the flag `--ignore-preflight-errors=all` to skip the check.
191
176
192
-
```
193
-
# master node
194
-
ip route add 10.244.2.0/24 via 10.148.0.2
195
-
196
-
# minion node
197
-
ip route add 10.244.1.0/24 via 10.148.0.1
198
-
```
177
+
Copy & Run it in all your minion nodes.
199
178
200
179
## Run and Verify
201
180
@@ -220,7 +199,9 @@ spec:
220
199
spec:
221
200
containers:
222
201
- name: pouch
223
-
image: docker.io/library/busybox:latest
202
+
image: docker.io/library/nginx:latest
203
+
ports:
204
+
- containerPort: 80
224
205
225
206
# kubectl create -f pouch.yaml
226
207
deployment "pouch" created
@@ -232,21 +213,37 @@ Confirm the pod of deployment is really running:
PING 10.244.1.4 (10.244.1.4) 56(84) bytes of data.
237
-
64 bytes from 10.244.1.4: icmp_seq=1 ttl=64 time=0.065 ms
238
-
64 bytes from 10.244.1.4: icmp_seq=2 ttl=64 time=0.068 ms
239
-
64 bytes from 10.244.1.4: icmp_seq=3 ttl=64 time=0.041 ms
240
-
64 bytes from 10.244.1.4: icmp_seq=4 ttl=64 time=0.047 ms
241
-
^C
242
-
--- 10.244.1.4 ping statistics ---
243
-
4 packets transmitted, 4 received, 0% packet loss, time 3048ms
244
-
rtt min/avg/max/mdev = 0.041/0.055/0.068/0.012 ms
216
+
# curl 10.244.1.4
217
+
<!DOCTYPE html>
218
+
<html>
219
+
<head>
220
+
<title>Welcome to nginx!</title>
221
+
<style>
222
+
body {
223
+
width: 35em;
224
+
margin: 0 auto;
225
+
font-family: Tahoma, Verdana, Arial, sans-serif;
226
+
}
227
+
</style>
228
+
</head>
229
+
<body>
230
+
<h1>Welcome to nginx!</h1>
231
+
<p>If you see this page, the nginx web server is successfully installed and
232
+
working. Further configuration is required.</p>
233
+
234
+
<p>For online documentation and support please refer to
235
+
<a href="http://nginx.org/">nginx.org</a>.<br/>
236
+
Commercial support is available at
237
+
<a href="http://nginx.com/">nginx.com</a>.</p>
238
+
239
+
<p><em>Thank you for using nginx.</em></p>
240
+
</body>
241
+
</html>
245
242
```
246
243
247
244
## Troubleshooting
248
245
249
-
- Because `kubeadm` still assumes docker as the only container runtime which can be used with kubernetes. When you use `kubeadm` to initialize the master node or join the minion node to the cluster, you may encounter the following error message:`[ERROR SystemVerification]: failed to get docker info: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?`. Use the flag `--skip-preflight-checks` to skip the check, like `kubeadm init --skip-preflight-checks`.
246
+
- Because `kubeadm` still assumes docker as the only container runtime which can be used with kubernetes. When you use `kubeadm` to initialize the master node or join the minion node to the cluster, you may encounter the following error message:`[ERROR SystemVerification]: failed to get docker info: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?`. Use the flag `--ignore-preflight-errors=all` to skip the check, like `kubeadm init --ignore-preflight-errors=all`.
250
247
251
248
- By default Pouch will support CRI v1alpha2,which means that using a version of Kubernetes prior to 1.10 will not work. As the NOTE mentioned above, we could start pouchd with the configuration like `pouchd --cri-version v1alpha1` to specify the version of CRI to support the version of Kubernetes below 1.10.
0 commit comments