New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
VSphere cloud provider settings with secret not working. #75175
Comments
|
/sig vmware |
|
@kubernetes/cloud-provider-vsphere-maintainers |
|
Same issue here on K8s 1.13.4 |
|
Same issue here on K8s 1.12 |
|
@divyenpatel do you have any information on this. |
|
/assign @SandeepPissay PTAL |
@krishn10 The above log indicates incorrect user name or password. Are you sure that the username/pwd was correct? Btw, I'm wondering why kubelet is trying to connect to vSphere. You should not be specifying vsphere.conf file in kubelet params if you are not using zones feature. Are you using zones feature? |
|
Same issue here on K8s 1.13.5 |
|
Same issue here on K8s 1.14.1 with the file vsphere.conf without secrets in CentOS 7 and installation with kubeadm. I have tried to escape the special character of the password and same result. Log vCenter |
|
any word on this? seems broken for ICP 3.1.0 |
|
I have the same issue. I was able to work around it by adding the username and password in plain text to the vsphere.conf file. The secret did work before, but definitely does not now. I believe the cause for us was upgrading K8s from 1.11.2 to 1.13.4. |
|
We are looking in this issue. |
|
It work for me on 1.15.2 with the following vsphere.conf file: [Global] [VirtualCenter "vcsa-03.k8s.lab"] [Workspace] [Disk] Hope it helps. |
|
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
|
@krishn10 @BrandonStiff @rleonardibm @tiempososcuros @framegrace @Ptyool /remove-lifecycle stale |
|
Hi, I can confirm that it's working on 1.15.3 |
|
I'm putting together a PR CAPV/699 to incorporate Regions and Zones into both the in-tree VCP and external CPI deployments. I've noticed that with the in-tree VCP, kubelet is not able to consume the secret data and authenticate. Both the [Global]
secret-name = "cloud-provider-vsphere-credentials"
secret-namespace = "kube-system"
datacenters = "RK_NonProd"
insecure-flag = "1"
[VirtualCenter "vcsrck-vdcn001.redacted.local"]
[Workspace]
server = "vcsrck-vdcn001.redacted.local"
datacenter = "RK_NonProd"
folder = "vm"
default-datastore = "RKQA_LUN01"
resourcepool-path = "'RK_NP_Infrastructure/Resources'"
[Disk]
scsicontrollertype = pvscsi
[Network]
public-network = "rck3236trunk"
[Labels]
region = "region"
zone = "zone"apiVersion: v1
data:
vcsrck-vdcn001.redacted.local.password: UGFzc3dvcmQtMTIz
vcsrck-vdcn001.redacted.local.username: dmNwQHJrbnB2Yy5sb2NhbA==
kind: Secret
metadata:
creationTimestamp: "2020-01-05T18:47:16Z"
name: cloud-provider-vsphere-credentials
namespace: kube-system
resourceVersion: "12"
selfLink: /api/v1/namespaces/kube-system/secrets/cloud-provider-vsphere-credentials
uid: 5f9ec9b7-e351-4e46-ba58-d91841d60974
type: OpaqueThe password in the above is correctly encoded as "Password-123" and works when specified through "user = " and "password = " in clear text. What happened: The The # systemctl restart kubelet; journalctl -f -u kubelet | grep -i nodeman
Jan 06 00:46:38 generic-cluster-1-controlplane-0 kubelet[21403]: E0106 00:46:38.576575 21403 nodemanager.go:398] Cannot connect to vCenter with err: ServerFaultCode: Cannot complete login due to an incorrect user name or password.When intercepting the <?xml version="1.0" encoding="UTF-8"?>
<Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/">
<Body>
<Login xmlns="urn:vim25">
<_this type="SessionManager">SessionManager</_this>
<userName></userName>
<password></password>
<locale>en_US</locale>
</Login>
</Body>
</Envelope>Next one sees the corresponding Response which matches the <?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<soapenv:Fault>
<faultcode>ServerFaultCode</faultcode>
<faultstring>Cannot complete login due to an incorrect user name or password.</faultstring>
<detail>
<InvalidLoginFault xmlns="urn:vim25" xsi:type="InvalidLogin"></InvalidLoginFault>
</detail>
</soapenv:Fault>
</soapenv:Body>
</soapenv:Envelope>What you expected to happen: If I read kubernetes/pkg/cloudprovider/providers/vsphere/vsphere.go Lines 286 to 295 in 9016740
kubernetes/pkg/cloudprovider/providers/vsphere/vsphere.go Lines 339 to 341 in 9016740
Upon failure, kubernetes/pkg/cloudprovider/providers/vsphere/nodemanager.go Lines 390 to 404 in 874f055
This isn't working correctly from what I can see and I haven't been able to debug further. I would expect to see the following log message from
Anything else we need to know?:
@Ptyool were your tests using the Region and Zone Labels and/or vSphere Storage? Environment: <name>VMware vCenter Server</name>
<fullName>VMware vCenter Server 6.7.0 build-13007421</fullName>
<apiType>VirtualCenter</apiType>
<apiVersion>6.7.2</apiVersion> |
|
@abrarshivani from the commit history, it seems you're the closest to this. Do you have any thoughts? ++ @divyenpatel |
|
This is blocking the Cluster API Provider or vSphere on 6.5. Any updates? Thanks! |
|
I do not have bandwidth to look into this issue. |
|
cc @yastij |
|
Is there any update or fix regarding this issue? |
|
cc @manojvs157 |
|
I can confirm this is still an issue in k8s 1.18.3. Situation: We have a working intree cloud provider config, with the credentials in a secret. It works to attach volumes in the cluster. As soon as you try to follow official vmWare documentation https://vmware.github.io/vsphere-storage-for-kubernetes/documentation/zones.html to enable Zone Support by adding the following 3 lines: The kubelet can't be started anymore with the following messages: As mentioned above, as soon as we configure the user & password directly as plaintext in the config file it works and Zone Support is activated. So at the moment you cannot use Zone Support safely, as you have to put your vmWare credentials in plain text into the cloud provider config. |
|
The issue is still present in 1.19.0 |
|
I have the same issue on k8s 1.18.3 (without zones) |
|
/assign @andrewsykim |
… secret provided and no CredentialsManager was set up. Partially solves kubernetes#75175. Kubelet does not stucking on startup.
… secret provided and no CredentialsManager was set up. Partially solves #75175. Kubelet does not stucking on startup.
… secret provided and no CredentialsManager was set up. Partially solves kubernetes#75175. Kubelet does not stucking on startup.

What happened:
VSphere cloud provider settings with secret not working. Kubernetes node goes into "Not-ready" state when the "/etc/cfc/conf/vsphere_cloud_conf" file is modified to use a secret (as stated in the vsphere support document here: https://vmware.github.io/vsphere-storage-for-kubernetes/documentation/existing.html Under point number 2.). The moment a secret file is created with a base64 encoded username and password, and the details updated in the vsphere_cloud_conf file, the node status goes to "Not-ready".
What you expected to happen:
Once the "/etc/cfc/conf/vsphere_cloud_conf" file is updated with the details of a secret file, and the kubernetes daemon and kubelet services is restarted (by running "systemctl daemon-reload" and "systemctl restart kubelet.service"), it is expected that the node comes back to a "ready" state and that all vsphere operations work fine.
How to reproduce it (as minimally and precisely as possible):
Create a vsphere secret file, secret.yaml, as follows:
Create the secret in the kube-system namespace:
Modify "/etc/cfc/conf/vsphere_cloud_conf" as follows:
Restart the kubelet service as follows:
Verify by checking the node status:
Here are the kubelet logs corresponding to the issue observed (Please note that the username and password have been verified with a base64 decode):
Anything else we need to know?:
The feature for using a vsphere secret was implemented in kubernetes version 1.11. I am using version 1.12.
Environment:
kubectl version): 1.12cat /etc/os-release): Ubuntu 18.04uname -a): Linux 4.15.0-46-generic Make cloudcfg method switch idiomatic. #49-Ubuntu SMP Wed Feb 6 09:33:07 UTC 2019 x86_64 x86_64 x86_64 GNU/LinuxThe text was updated successfully, but these errors were encountered: