-1

我们正在尝试使用 Docker 和 Kubernetes 两个组件来设置 IBM Datastage 容器。IBM 使用 Kubernetes 和 Calico(纯 IP 网络结构)作为网络。IBM 使用 ansible + shell 脚本在容器化环境中设置 InfoSphere DataStage 的部署。

在我们在 3 个未运行的节点上安装 calico pod 后,kube-dns 也处于创建状态。

NAMESPACE   NAME                                    READY STATUS           RESTARTS AGE
default     docker-registry-6d46c849dc-crx6p         1/1  Running             0     2h
kube-system calico-etcd-47b9q                        1/1  Running             0     2h
kube-system calico-kube-controllers-6fb8b4d696-62xmr 1/1  Running             0     9m
kube-system calico-node-5hrpj                        1/2  CrashLoopBackOff    31    2h
kube-system calico-node-bsldv                        1/2  CrashLoopBackOff    30    2h
kube-system calico-node-qfxt4                        1/2  CrashLoopBackOff    30    2h
kube-system etcd-k8snode1                            1/1  Running             0     2h
kube-system kube-apiserver-k8snode1.luc...           1/1  Running             0     2h
kube-system kube-controller-manager-k8s...           1/1  Running             0     2h
kube-system kube-dns-6f4fd4bdf-k6szc                 0/3  ContainerCreating   0     2h
kube-system kube-proxy-92869                         1/1  Running             0     2h
kube-system kube-proxy-pbpc4                         1/1  Running             0     2h
kube-system kube-proxy-sd5w5i                        1/1  Running             0     2h
kube-system kube-scheduler-k8snode1                  1/1  Running             0     2h
test-1      is-en-conductor-0                        0/1  ContainerCreating   0     2h
test-1      is-engine-compute-0                      0/1  ContainerCreating   0     2h
test-1      is-servicesdocker-pod-b54c55f8c-72d62    0/1  ContainerCreating   0     2h
test-1      is-xmetadocker-pod-68774595cb-crbwl      0/1  ContainerCreating   0     2h

创建 calico-node 和 kube-dns 时出错...谁能帮助我们?

4

1 回答 1

1

PodCidr 可能与192.168.0.0/16Calico 需要的不匹配。这并不能保证它会解决您的问题,但无论如何您都可以在您的/etc/kubernetes/manifests/kube-controller-manager.yml:

...
containers:
- command:
  - kube-controller-manager
  - --address=127.0.0.1
  - --allocate-node-cidrs=true
  - --cloud-provider=aws
  - --cluster-cidr=192.168.0.0/16 <== Here.
...

然后ConfigMap为您编辑kube-proxy

$ kubectl -n kube-system edit configmap kube-proxy

apiVersion: v1
data:
  config.conf: |-
    apiVersion: kubeproxy.config.k8s.io/v1alpha1
    bindAddress: 0.0.0.0
    clientConnection:
      acceptContentTypes: ""
      burst: 10
      contentType: application/vnd.kubernetes.protobuf
      kubeconfig: /var/lib/kube-proxy/kubeconfig.conf
      qps: 5
    clusterCIDR: 192.168.0.0/16 <== change this
    configSyncPeriod: 15m0s
    ...

然后重新启动集群中的所有服务器。

希望能帮助到你。

于 2018-10-09T06:55:57.517 回答