flexvolume | Simple wrapper library for quick FlexVolume prototypes | Wrapper library
kandi X-RAY | flexvolume Summary
kandi X-RAY | flexvolume Summary
Simple wrapper library for quick FlexVolume prototypes.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Commands for flexvolume .
- handle handles the response .
flexvolume Key Features
flexvolume Examples and Code Snippets
Community Discussions
Trending Discussions on flexvolume
QUESTION
We have a docker image that is processing some files on a samba share.
For this we created a cifs share which is mounted to /mnt/dfs and files can be accessed in the container with:
...ANSWER
Answered 2021-May-21 at 07:50No, that field has no effect on the FlexVol plugin you linked. It doesn't even bother parsing out the size you pass in :)
QUESTION
Does the Oracle Cloud Kubernetes CSI implementation depend on the flex-volumes?
In other words, in order to use the OCI CSI (i.e. csi-oci-node
driver and csi-oci-controller
driver), do I need to deploy oci-block-volume-provisioner
and oci-flexvolume-driver
?
Ref: https://github.com/oracle/oci-cloud-controller-manager#setup-and-installation
...ANSWER
Answered 2021-Mar-31 at 11:37Deploying of OCI-block-volume-provisioned and oci-flexvolume-drive in order to use OCI CSI is not mandatory but recommended.
OCI Flexvolume Driver: It enables mounting of OCI block storage volumes to Kubernetes Pods via the Flexvolume plugin interface.
OCI Volume Provisioner: The OCI Volume Provisioner enables dynamic provisioning of storage resources when running Kubernetes on Oracle Cloud Infrastructure. It uses the OCI Flexvolume Driver to bind storage resources to Kubernetes nodes. The volume provisioner offers support for Block Volume.
QUESTION
I have an issue setting up persistant volumes for gitlab on my bare-metal kubernetes cluster:
Operation for "provision-gitlab/repo-data-gitlab-gitaly-0[3f758288-290c-4d9c-a084-5506f58a22d7]" failed. No retries permitted until 2020-11-28 11:55:56.533202624 +0000 UTC m=+305.008238514 (durationBeforeRetry 4s). Error: "failed to create volume: failed to create volume: see kube-controller-manager.log for details"
Problem is: this file doesn't exist anywhere, and I cannot get any more details about the problem, even by adapting the configuration:
...ANSWER
Answered 2020-Nov-30 at 23:41Control Plane components use klog
library for logging which, for the moment, is rather badly documented.
Actually --log-dir
and --log-file
are mutually exclusive.
QUESTION
Many of my workflows use pod iam roles. As documented here, I must include fsGroup in order for non-root containers to read the generated identity token. The problem with this is when I additionally include pvc’s that point to cifs pv’s, the volumes fail to mount because they time out. Seemingly this is because Kubelet tries to chown all of the files on the volume, which takes too much time and causes the timeout. Questions…
- Why doesnt Kubernetes try to chown all of the files when hostPath is used instead of a pvc? All of the workflows were fine until I made the switch to use pvcs from hostPath, and now the timeout issue happens.
- Why does this problem happen on cifs pvcs but not nfs pvcs? I have noticed that nfs pvcs continue to mount just fine and the fsGroup seemingly doesn’t take effect as I don’t see the group id change on any of the files. However, the cifs pvcs can no longer be mounted seemingly due to the timeout issue. If it matters, I am using the native nfs pv lego and this cifs flexVolume plugin that has worked great up until now.
Overall, the goal of this post is to better understand how Kubernetes determines when to chown all of the files on a volume when fsGroup is included in order to make a good design decision going forward. Thanks for any help you can provide!
Kubernetes Chowning Files References
https://docs.microsoft.com/en-us/azure/aks/troubleshooting
Since gid and uid are mounted as root or 0 by default. If gid or uid are set as non-root, for example 1000, Kubernetes will use chown to change all directories and files under that disk. This operation can be time consuming and may make mounting the disk very slow.
...By default, Kubernetes recursively changes ownership and permissions for the contents of each volume to match the fsGroup specified in a Pod's securityContext when that volume is mounted. For large volumes, checking and changing ownership and permissions can take a lot of time, slowing Pod startup.
ANSWER
Answered 2020-Oct-29 at 20:17I posted this question on the Kubernetes Repo a while ago and it was recently answered in the comments.
The gist is fsgroup support is implemented and decided on per plugin. They ignore it for nfs
, which is why I have never seen Kubelet chown files on nfs pvcs. For FlexVolume plugins, a plugin can opt-out of fsGroup based permission changes by returning FSGroup false
. So, that is why Kubelet was trying to chown the cifs pvcs -- the FlexVolume plugin I am using does not return fsGroup false
.
So, in the end you don't need to worry about this for nfs
, and if you are using a FlexVolume plugin for a shared file system, you should make sure it returns fsGroup false
if you don't want Kubelet to chown all of the files.
QUESTION
i've finished setting up my HA k8s cluster using kubeadm. Everything seems to be working fine, but after checking with the command kubectl get componentstatus I get:
...ANSWER
Answered 2020-Aug-03 at 07:37This is a known issue which unfortunately is not going to be fixed as the feature is planned to be deprecated. Also, see this source:
I wouldn't expect a change for this issue. Upstream Kubernetes wants to deprecate component status and does not plan on enhancing it. If you need to check for cluster health using other monitoring sources is recommended.
kubernetes/kubernetes#93171 - 'fix component status server address' which is getting recommendation to close due to deprecation talk.
kubernetes/enhancements#553 - Deprecate ComponentStatus
kubernetes/kubeadm#2222 - kubeadm default init and they are looking to 'start printing a warning in kubect get componentstatus that this API object is no longer supported and there are plans to remove it.'
QUESTION
I'm trying to use k8s secrets or having environment variables from my local environment to set the flexvol options values, is that possible?
I can see secrets mounted successfully but the flexvol is not able to be mount successfully. Appreciate if there is any different solution other than secrets if any.
The deployment.yaml
...ANSWER
Answered 2020-Mar-07 at 00:18I've been looking into the same thing and it's not really possible without external tools.
The problem is that flexvolume is only taking the credentials from secret, but rest is considered configuration and needs to be passed in. What you want to do here is essentially variable substitution, which kubernetes does not, and will not support: https://github.com/kubernetes/kubernetes/issues/52787#issuecomment-369645645
On the bright side, you can use any tool to substitute those values with variables from your env variables, from a bash/ps script, up to proper kubernetes deployment solutions like helm.
KV flexvolume is open-source, so could also be modified to handle this use-case
QUESTION
i am trying to deploy image which has some change to it environment variables, but when i do so i am getting below error
The Pod "envar-demo" is invalid: spec: Forbidden: pod updates may not change fields other than
spec.containers[*].image
,spec.initContainers[*].image
,spec.activeDeadlineSeconds
orspec.tolerations
(only additions to existing tolerations) {"Volumes":[{"Name":"default-token-9dgzr","HostPath":null,"EmptyDir":null,"GCEPersistentDisk":null,"AWSElasticBlockStore":null,"GitRepo":null,"Secret":{"SecretName":"default-token-9dgzr","Items":null,"DefaultMode":420,"Optional":null},"NFS":null,"ISCSI":null,"Glusterfs":null,"PersistentVolumeClaim":null,"RBD":null,"Quobyte":null,"FlexVolume":null,"Cinder":null,"CephFS":null,"Flocker":null,"DownwardAPI":null,"FC":null,"AzureFile":null,"ConfigMap":null,"VsphereVolume":null,"AzureDisk":null,"PhotonPersistentDisk":null,"Projected":null,"PortworxVolume":null,"ScaleIO":null,"StorageOS":null}],"InitContainers":null,"Containers":[{"Name":"envar-demo-container","Image":"gcr.io/google-samples/node-hello:1.0","Command":null,"Args":null,"WorkingDir":"","Ports":null,"EnvFrom":null,"Env":[{"Name":"DEMO_GREETING","Value":"Hello from the environment
my yaml.
...ANSWER
Answered 2019-Jun-14 at 11:31actually, you are better off using deployments for this use case.
QUESTION
I am creating the below mongodb statefulset which creates 3 replicas but when I run the code I get the below error and all pods are in CrashLoopBackOff state.
This is the error which I get when I try kubectl create -f
...ANSWER
Answered 2019-Aug-14 at 10:10--smallfiles
is not supported in newest mongo (4.2) you can check it in doc, you are not specifying image tag so newest latest
is pull in this case mongo 4.2.
If you set image: mongo:4.0
your configuration should be correct.
QUESTION
I've been delving into Rook+Ceph for Kubernetes, trying to get it to work under Google Kubernetes Engine, and have hit a brick wall.
Following the documentation, I've run the following commands, and verified that each has had the intended effect:
...ANSWER
Answered 2019-Jun-24 at 09:57Make sure you fillfull every single prerequisities for Rook setup: rook_setup.
Then try to install :
QUESTION
I'm trying to attach the dummy-attachable FlexVolume sample for Kubernetes which seems to initialize normally according to my logs on both the nodes and master:
...ANSWER
Answered 2019-May-03 at 18:58So this is a fun one.
Even though kubelet initializes the FlexVolume plugin on master, kube-controller-manager, which is containerized in KOPs, is the application that's actually responsible for attaching the volume to the pod. KOPs doesn't mount the default plugin directory /usr/libexec/kubernetes/kubelet-plugins/volume/exec
into the kube-controller-manager pod, so it doesn't know anything about your FlexVolume plugins on master.
There doesn't appear to be a non-hacky way to do this other than to use a different Kubernetes deployment tool until KOPs addresses this problem.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install flexvolume
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page