无法在OpenStack中启动Kubernetes集群

时间:2016-12-28 13:57:58

标签: kubernetes openstack openstack-heat

我正在尝试使用此处提到的步骤在OpenStack中调出Kubernetes集群 - > http://kubernetes.io/docs/getting-started-guides/openstack-heat/

命令KUBERNETES_PROVIDER=openstack-heat ./cluster/kube-up.sh失败,并显示以下消息:

... Starting cluster using provider: openstack-heat
... calling verify-prereqs
swift client installed
glance client installed
nova client installed
heat client installed
openstack client installed
... calling kube-up
kube-up for provider openstack-heat
[INFO] Execute commands to create Kubernetes cluster
[INFO] Uploading kubernetes-server-linux-amd64.tar.gz
kubernetes-server.tar.gz
[INFO] Uploading kubernetes-salt.tar.gz
kubernetes-salt.tar.gz
[INFO] Image CentOS7 already exists
[INFO] Key pair already exists
Stack not found: KubernetesStack
[INFO] Retrieve new image ID
[INFO] Image Id 44284b7f-4f83-4c5d-89a2-992fab6ddaa3
[INFO] Create stack KubernetesStack
b'#cloud-config\nmerge_how: dict(recurse_array)+list(append)\nbootcmd:\n  - mkdir -p /etc/salt/minion.d\n  - mkdir -p /srv/salt-overlay/pillar\nwrite_files:\n  - path: /etc/salt/minion.d/log-level-debug.conf\n    content: |\n      log_level: warning\n      log_level_logfile: warning\n  - path: /etc/salt/minion.d/grains.conf\n    content: |\n      grains:\n        node_ip: $MASTER_IP\n        publicAddressOverride: $MASTER_IP\n        network_mode: openvswitch\n        networkInterfaceName: eth0\n        api_servers: $MASTER_IP\n        cloud: openstack\n        cloud_config: /srv/kubernetes/openstack.conf\n        roles:\n          - $role\n        runtime_config: ""\n        docker_opts: ""\n        master_extra_sans: "DNS:kubernetes,DNS:kubernetes.default,DNS:kubernetes.default.svc,DNS:kubernetes.default.svc.cluster.local,DNS:kubernetes-master"\n        keep_host_etcd: true\n        kube_user: $KUBE_USER\n  - path: /srv/kubernetes/openstack.conf\n    content: |\n      [Global]\n      auth-url=$OS_AUTH_URL\n      username=$OS_USERNAME\n      password=$OS_PASSWORD\n      region=$OS_REGION_NAME\n      tenant-id=$OS_TENANT_ID\n      [LoadBalancer]\n      lb-version=$LBAAS_VERSION\n      subnet-id=$SUBNET_ID\n      floating-network-id=$FLOATING_NETWORK_ID\n  - path: /srv/salt-overlay/pillar/cluster-params.sls\n    content: |\n      service_cluster_ip_range: 10.246.0.0/16\n      cert_ip: 10.246.0.1\n      enable_cluster_monitoring: influxdb\n      enable_cluster_logging: "true"\n      enable_cluster_ui: "true"\n      enable_node_logging: "true"\n      logging_destination: elasticsearch\n      elasticsearch_replicas: "1"\n      enable_cluster_dns: "true"\n      dns_server: 10.246.0.10\n      dns_domain: cluster.local\n      enable_dns_horizontal_autoscaler: "false"\n      federations_domain_map: \'\'\n      instance_prefix: kubernetes\n      admission_control: NamespaceLifecycle,LimitRanger,SecurityContextDeny,ServiceAccount,DefaultStorageClass,ResourceQuota\n      enable_cpu_cfs_quota: "true"\n      network_provider: none\n      opencontrail_tag: R2.20\n      opencontrail_kubernetes_tag: master\n      opencontrail_public_subnet: 10.1.0.0/16\n      e2e_storage_test_environment: "false"\n' is not JSON serializable

对于kube-up.sh命令的不同执行,最后一行是不同的。我注意到这对应于/cluster/openstack-heat/kubernetes-heat/kubecluster.yaml中存在的yaml和sh文件。在此示例中,这是./cluster/openstack-heat/kubernetes-heat/fragments/configure-salt.yaml

由于某种原因,它无法将这些文件的内容合并到kubecluster.yaml中。

有什么想法吗?

1 个答案:

答案 0 :(得分:0)

管理解决这个问题。这是因为python-heatclient 1.1.0中的一个错误。 https://bugs.launchpad.net/python-heatclient/+bug/1589519

升级到1.3.0版解决了这个问题。