Skip to content
This repository has been archived by the owner on Oct 12, 2023. It is now read-only.

MountVolume.SetUp failed for volume "" : invalid character '/' looking for beginning of value #198

Open
joymon opened this issue Aug 11, 2021 · 1 comment
Labels
bug Something isn't working

Comments

@joymon
Copy link

joymon commented Aug 11, 2021

Describe the bug

I followed the tutorial given in the readme of this project to set up my local dev environment. But the pod is not getting started. Below is the error from kubectl describe pod.

Warning FailedMount 11m (x6 over 27m) kubelet Unable to attach or mount volumes: unmounted volumes=[azkvvolume], unattached volumes=[azkvvolume default-token-bkfjq]: timed out waiting
for the condition
Warning FailedMount 44s (x23 over 31m) kubelet MountVolume.SetUp failed for volume "azkvvolume" : invalid character '/' looking for beginning of value

One change I did apart from the tutorial is to change the hostPath volume of flex vol installer script as mentioned in #182 . I did this as I am running on Docker Desktop with K8s enabled.

Below is my yml
volumeMounts:
- name: azkvvolume
mountPath: /kvmnt
readOnly: true
volumes:
- name: azkvvolume
flexVolume:
driver: "azure/kv"
secretRef:
name: kvcreds
options:
tenantid: ""
subscriptionid: ""
resourcegroup:
usepodidentity: "false"
usevmmanagedidentity: "false"
keyvaultname: ""
keyvaultobjectnames: ""
keyvaultobjecttypes: secret

Steps To Reproduce

Expected behavior

The pod should run and get the Azure KV secrets to be mounted as files

Key Vault FlexVolume version

As per the kv-flexvol-installer.yml , mcr.microsoft.com/k8s/flexvolume/keyvault-flexvolume:v0.0.17

Access mode: service principal or pod identity

service-principal

Kubernetes version

Client Version: version.Info{Major:"1", Minor:"21", GitVersion:"v1.21.2", GitCommit:"092fbfbf53427de67cac1e9fa54aaa09a28371d7", GitTreeState:"clean", BuildDate:"2021-06-16T12:59:11Z", GoVersion:"go1.16.5",
Compiler:"gc", Platform:"windows/amd64"}
Server Version: version.Info{Major:"1", Minor:"19", GitVersion:"v1.19.7", GitCommit:"1dd5338295409edcfff11505e7bb246f0d325d15", GitTreeState:"clean", BuildDate:"2021-01-13T13:15:20Z", GoVersion:"go1.15.5",
Compiler:"gc", Platform:"linux/amd64"}

Environment

  • Docker Desktop on WSL2 backend
  • Windows 10 Enterprise
  • ASP.Net 5
  • Linux containers

Additional context

Most of the issues here are talking about a log file located on the host machine at the below path

/var/log/kv-driver.log

Unfortunately, I am not able to locate that file in Docker Desktop running on WSL2. I tried to search using the WSL2 command but had no luck. This file may be having more details to save me.

I work for an enterprise and the latest CSI KeyVault driver is not yet approved there.

@joymon joymon added the bug Something isn't working label Aug 11, 2021
@aramase
Copy link
Member

aramase commented Aug 16, 2021

@joymon Thank you for reporting the issue!

https://github.com/kubernetes-sigs/secrets-store-csi-driver is the next generation of this flexvol solution/repo. Please use the secrets store csi driver as this solution is deprecated and the repository is going to be archived.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants