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

Improve VCP Documentation for different Kubernetes versions #479

Closed embano1 closed 6 years ago

embano1 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: Improve VCP documentation (https://vmware.github.io/vsphere-storage-for-kubernetes/documentation/index.html).

What you expected to happen: As discussed with @divyenpatel

How to reproduce it (as minimally and precisely as possible):

Anything else we need to know?:

Environment:

alesz commented 6 years ago

Followed improved documentation for deployment of k8s 1.9, having trouble understanding datacenters variable in case of whitespace in the name. Example expected vsphere.conf:

EDITED went with, there is still ambiguity though, since VCs are clustered and can manage each others:

[Global]
user = "k8s_service"        
password = "xxxx"        
port = "443"        
insecure-flag = "1"        

[VirtualCenter "first.dc.example.com"]
datacenters = "First DataCenter"

[VirtualCenter "second.dc.example.com"]
datacenters = "Second DataCenter"

[Disk]
scsicontrollertype = pvscsi

[Workspace]
server = "first.dc.example.com"
datacenter = "First DataCenter"
folder = "/OpenShift/"
default-datastore = "FIRST-DS"
embano1 commented 6 years ago

@alesz whitespaces should be handled correctly, e.g. here's the code for v1.9 VCP:

datacenters := strings.Split(vsi.cfg.Datacenters, ",")
                for _, dc := range datacenters {
                    dc = strings.TrimSpace(dc)
                    if dc == "" {
                        continue
                    }

https://github.com/kubernetes/kubernetes/blob/release-1.9/pkg/cloudprovider/providers/vsphere/nodemanager.go#L135

alesz commented 6 years ago

Thanks, updated to:

[Global]
datacenters = "First DataCenter, Second DataCenter"

and removed entries under VirtualCenter sections

mqasimsarfraz commented 6 years ago

:+1:

Also do we even need vsphere.conf on worker nodes for kube > 1.9 ?

embano1 commented 6 years ago

@MQasimSarfraz just the --cloud-provider flag for kubelet.

mqasimsarfraz commented 6 years ago

Thanks @embano1. Some installers e.g kubespray are still putting them on worker nodes. So needs to be updated.

divyenpatel commented 6 years ago

Addressed Requested Changes with this PR - https://github.com/vmware/vsphere-storage-for-kubernetes/pull/39