Rancher Kube API运行状况检查失败,通过群集API构建

时间:2019-06-01 07:50:51

标签: rancher

我正在尝试使用API​​调用+ Ansible(使用AWS作为云提供商)来创建新集群。我已经生成了所需的节点模板,然后开始触发构建。

  1. 当我使用内置的节点模板从UI触发集群创建时,集群创建成功完成。

  2. 当我通过代码触发集群创建时,集群部署了大多数集群,但是在运行状况检查时失败。

我试图通过UI进行构建-并且每次都可以运行。

我还尝试过更改称为参数的API,但是它们都不起作用。

      shell: "`curl -s 'https://{{ rancher_server }}/v3/cluster' -H 'content-type: application/json' -H 'Authorization: Bearer {{ racherlogintoken.stdout }}' --data-binary '{\"dockerRootDir\":\"/var/lib/docker\",\"enableNetworkPolicy\":false,\"type\":\"cluster\",\"rancherKubernetesEngineConfig\":{\"addonJobTimeout\":30,\"ignoreDockerVersion\":true,\"kubernetesVersion\": \"v1.11.5-rancher1-1\",\"sshAgentAuth\":false,\"type\":\"rancherKubernetesEngineConfig\",\"authentication\":{\"type\":\"authnConfig\",\"strategy\":\"x509\"},\"network\":{\"type\":\"networkConfig\",\"plugin\":\"calico\"}, \"cloudProvider\":{\"awsCloudProvider\":{\"type\":\"/v3/schemas/awsCloudProvider\"}, \"name\":\"aws\", \"type\":\"/v3/schemas/cloudProvider\"},\"monitoring\":{\"type\":\"monitoringConfig\",\"provider\":\"metrics-server\"}, \"services\":{\"type\":\"rkeConfigServices\",\"kubeApi\":{\"podSecurityPolicy\":false,\"type\":\"kubeAPIService\"},\"etcd\":{\"snapshot\":false,\"type\":\"etcdService\",\"extraArgs\":{\"heartbeat-interva\":500,\"election-timeout\":5000}}}},\"name\":\"{{ mdio_cluster_name }}\"}' --insecure` | jq -r .data[].id"

Errors:

2019/06/01 07:40:28 [ERROR] cluster [c-sgd2w] provisioning: [controlPlane] Failed to bring up Control Plane: Failed to verify healthcheck: Failed to check https://localhost:6443/healthz for service [kube-apiserver] on host [x.x.x.x]: Get https://localhost:6443/healthz: read tcp [::1]:60288->[::1]:6443: read: connection reset by peer, log: I0601 07:40:24.813709       1 plugins.go:161] Loaded 6 validating admission controller(s) successfully in the following order: LimitRanger,ServiceAccount,Priority,PersistentVolumeClaimResize,ValidatingAdmissionWebhook,ResourceQuota.
2019/06/01 07:40:28 [ERROR] ClusterController c-sgd2w [cluster-provisioner-controller] failed with : [controlPlane] Failed to bring up Control Plane: Failed to verify healthcheck: Failed to check https://localhost:6443/healthz for service [kube-apiserver] on host [x.x.x.x]: Get https://localhost:6443/healthz: read tcp [::1]:60288->[::1]:6443: read: connection reset by peer, log: I0601 07:40:24.813709       1 plugins.go:161] Loaded 6 validating admission controller(s) successfully in the following order: LimitRanger,ServiceAccount,Priority,PersistentVolumeClaimResize,ValidatingAdmissionWebhook,ResourceQuota.
2019/06/01 07:40:30 [INFO] 2019/06/01 07:40:30 http: multiple response.WriteHeader calls
2019/06/01 07:40:40 [INFO] 2019/06/01 07:40:40 http: multiple response.WriteHeader calls
2019/06/01 07:40:50 [INFO] 2019/06/01 07:40:50 http: multiple response.WriteHeader calls

1 个答案:

答案 0 :(得分:0)

看起来是引起问题的网络“印花布”。使用过的“运河”,情况会更好。