Merge remote-tracking branch 'upstream/master' into release-1.6
This commit is contained in:
@@ -61,9 +61,6 @@ echo "192.168.121.9 centos-master
|
||||
* Edit /etc/kubernetes/config which will be the same on all hosts to contain:
|
||||
|
||||
```shell
|
||||
# Comma separated list of nodes in the etcd cluster
|
||||
KUBE_ETCD_SERVERS="--etcd-servers=http://centos-master:2379"
|
||||
|
||||
# logging to stderr means we get it in the systemd journal
|
||||
KUBE_LOGTOSTDERR="--logtostderr=true"
|
||||
|
||||
@@ -111,6 +108,9 @@ KUBE_API_PORT="--port=8080"
|
||||
# Port kubelets listen on
|
||||
KUBELET_PORT="--kubelet-port=10250"
|
||||
|
||||
# Comma separated list of nodes in the etcd cluster
|
||||
KUBE_ETCD_SERVERS="--etcd-servers=http://centos-master:2379"
|
||||
|
||||
# Address range to use for services
|
||||
KUBE_SERVICE_ADDRESSES="--service-cluster-ip-range=10.254.0.0/16"
|
||||
|
||||
|
||||
@@ -134,10 +134,10 @@ $ kubectl get --all-namespaces services
|
||||
should show a set of [services](/docs/user-guide/services) that look something like this:
|
||||
|
||||
```shell
|
||||
NAMESPACE NAME CLUSTER_IP EXTERNAL_IP PORT(S) SELECTOR AGE
|
||||
default kubernetes 10.0.0.1 <none> 443/TCP <none> 1d
|
||||
kube-system kube-dns 10.0.0.2 <none> 53/TCP,53/UDP k8s-app=kube-dns 1d
|
||||
kube-system kube-ui 10.0.0.3 <none> 80/TCP k8s-app=kube-ui 1d
|
||||
NAMESPACE NAME CLUSTER_IP EXTERNAL_IP PORT(S) AGE
|
||||
default kubernetes 10.0.0.1 <none> 443/TCP 1d
|
||||
kube-system kube-dns 10.0.0.2 <none> 53/TCP,53/UDP 1d
|
||||
kube-system kube-ui 10.0.0.3 <none> 80/TCP 1d
|
||||
...
|
||||
```
|
||||
|
||||
|
||||
@@ -195,6 +195,46 @@ Once a pod network has been installed, you can confirm that it is working by che
|
||||
|
||||
And once the `kube-dns` pod is up and running, you can continue by joining your nodes.
|
||||
|
||||
|
||||
You may have trouble in the configuration if you see the following statuses
|
||||
|
||||
```
|
||||
NAMESPACE NAME READY STATUS RESTARTS AGE
|
||||
kube-system canal-node-f0lqp 2/3 RunContainerError 2 48s
|
||||
kube-system canal-node-77d0h 2/3 CrashLoopBackOff 3 3m
|
||||
kube-system kube-dns-2924299975-7q1vq 0/4 ContainerCreating 0 15m
|
||||
```
|
||||
|
||||
The three statuses ```RunContainerError``` and ```CrashLoopBackOff``` and ```ContainerCreating``` are very common.
|
||||
|
||||
To help diagnose what happened, you can use the following command to check what is in the logs:
|
||||
|
||||
```bash
|
||||
kubectl describe -n kube-system po {YOUR_POD_NAME}
|
||||
```
|
||||
|
||||
Do not using kubectl logs. You will got the following error:
|
||||
|
||||
```
|
||||
# kubectl logs -n kube-system canal-node-f0lqp
|
||||
Error from server (BadRequest): the server rejected our request for an unknown reason (get pods canal-node-f0lqp)
|
||||
```
|
||||
|
||||
The ```kubectl describe``` comand gives you more details about the logs
|
||||
|
||||
```
|
||||
# kubectl describe -n kube-system po kube-dns-2924299975-1l2t7
|
||||
2m 2m 1 {kubelet nac} spec.containers{flannel} Warning Failed Failed to start container with docker id 927e7ccdc32b with error: Error response from daemon: {"message":"chown /etc/resolv.conf: operation not permitted"}
|
||||
|
||||
```
|
||||
|
||||
Or
|
||||
```
|
||||
6m 1m 191 {kubelet nac} Warning FailedSync Error syncing pod, skipping: failed to "SetupNetwork" for "kube-dns-2924299975-1l2t7_kube-system" with SetupNetworkError: "Failed to setup network for pod \"kube-dns-2924299975-1l2t7_kube-system(dee8ef21-fbcb-11e6-ba19-38d547e0006a)\" using network plugins \"cni\": open /run/flannel/subnet.env: no such file or directory; Skipping pod"
|
||||
```
|
||||
|
||||
You can then do some Google searches on the error messages, which may help you to find some solutions.
|
||||
|
||||
### (4/4) Joining your nodes
|
||||
|
||||
The nodes are where your workloads (containers and pods, etc) run.
|
||||
|
||||
Reference in New Issue
Block a user