vmware-archive / kubernetes-archived

This repository is archived. Please file in-tree vSphere Cloud Provider issues at https://github.com/kubernetes/kubernetes/issues . CSI Driver for vSphere is available at https://github.com/kubernetes/cloud-provider-vsphere
Apache License 2.0
46 stars 31 forks source link

Unable to add vmware support to a cluster povisioned by kubespray #497

Open phozzy opened 6 years ago

phozzy commented 6 years ago

Is this a BUG REPORT or FEATURE REQUEST?:

Uncomment only one, leave it on its own line:

/kind bug /kind feature

What happened: After installing kubernetes cluster with kubespray I have manifests files with *.mainfest extension. That leads to https://github.com/vmware/kubernetes/blob/f50f340267a7fab8e2a959958c717868b7e4162f/enable-vcp-image/enable-vcp-scripts/daemonset_pod.sh#L186 https://github.com/vmware/kubernetes/blob/f50f340267a7fab8e2a959958c717868b7e4162f/enable-vcp-image/enable-vcp-scripts/daemonset_pod.sh#L239 checks fail. So everything breaks at this moment. What you expected to happen: I expect this scripts to be extensions agnostic. They have to check if they are yaml or json files by syntaxes check. How to reproduce it (as minimally and precisely as possible): Install cluster with kubespray, try to add vmware support.

Anything else we need to know?:

Environment:

CENTOS_MANTISBT_PROJECT="CentOS-7" CENTOS_MANTISBT_PROJECT_VERSION="7" REDHAT_SUPPORT_PRODUCT="centos" REDHAT_SUPPORT_PRODUCT_VERSION="7"

divyenpatel commented 6 years ago

@phozzy kubespray support enabling vSphere Cloud Provider during deployment.

you need to edit kubespray/inventory/group_vars/all.yml and set following parameters

    $ grep -v '^#' all.yml 
bootstrap_os: ubuntu

vsphere_vcenter_ip: "10.192.44.199"
vsphere_vcenter_port: 443
vsphere_insecure: 1
vsphere_user: "Administrator@vsphere.local"
vsphere_password: "Admin!23"
vsphere_datacenter: "vcqaDC"
vsphere_datastore: "vsanDatastore"
vsphere_working_dir: "kubernetes"
vsphere_scsi_controller_type: "pvscsi"

etcd_data_dir: /var/lib/etcd

bin_dir: /usr/local/bin

This does not support multi vc/datacenter deployment, but basic single vc/datacenter setup should work fine with this.

phozzy commented 6 years ago

Yep, that will work. But anyway checking file-type by its extension is not good way.