Questions tagged [kubernetes-volume]

Kubernetes volumes provide persistent storage to pods running in a Kubernetes cluster.

21 questions
5
votes
1 answer

How to run a container from within another container while also mounting a volume from the first container?

I'm running a build in Jenkins which is running inside Kubernetes. When the job starts, a container starts in the cluster and the build runs inside it. A step in the build requires building an RPM using rpmbuild and for that matter I use this docker…
Itai Ganot
  • 410
  • 2
  • 11
5
votes
1 answer

Angular config maps in kubernetes

How can I integrate a config map into my angular application in kubernetes? Any useful blogs or videos implementing this would be helpful. I found a few, but they didn't work for me.
Madan
  • 111
  • 1
  • 2
  • 5
4
votes
1 answer

Kubernetes serve static content with ingress

I have a simple Django application and on a regular EC2 instance nginx is a reverse proxy serving static files and proxying requests to gunicorn/wsgi backend app. Should I have a separate deployment and service for nginx which will be able to access…
Most Wanted
  • 691
  • 8
  • 18
4
votes
2 answers

How to check available volume provisioners in Kubernetes cluster?

Is there a command or script that one can use to see or list enabled/available volume provisioners in a Kubernetes cluster? We have an on-premise cluster and I came to know the hard way that 'local' provisioner has already been enabled in the…
cnu
  • 194
  • 7
3
votes
0 answers

How to tell on which node a local storage PV has been created on k8s?

I have provisioned manually a few small local storage PVs for a redis stateful set (I have provisioned 10 on a 3 node cluster) They seem to to be working fine. The pods created by the redis stateful set got their volume claim templates fulfilled. I…
Tom Klino
  • 131
  • 2
2
votes
1 answer

How do you reuse a specific volume in Kubernetes?

Let's say that you wanted to create a Jenkins Deployment. As Jenkins uses a local XML file for configuration and state, you would want to create a PersistentVolume so that your data could be saved across Pod evictions and Deployment deletions. I…
2
votes
1 answer

Failed to prepare subPath for volumeMount

I'm baffled by an issue that just started on my multi-node kubernetes cluster (I run it with microk8s): Error: failed to prepare subPath for volumeMount "scripts" of container "zookeeper" The config that triggers this error is: …
JPFrancoia
  • 123
  • 2
2
votes
0 answers

How do I use a raw volume with a database on Kubernetes?

I'm trying to figure out how to launch a web application in a Kubernetes cluster on AWS. Right now I'm not certain about a database. I can see that one can use raw block volumes, which are supposedly faster: This mode is useful to provide a Pod the…
1
vote
0 answers

CSI Driver: FSGroup mentioned in POD spec is not accessible from NodePublish volume

I am using volumeMountGroup := req.GetVolumeCapability().GetMount().GetVolumeMountGroup() klog.V(2).Infof("-NodePublishVolume-: volumeMountGroup: %v",volumeMountGroup) in my CSI NodePublishVolume method to access FSGroup mentioned in pod spec. My…
1
vote
1 answer

Deploying a statefulSet with static volume provisioning but controller insists to use dynamic

I am trying to deploy a statefulSet that will use static volume provisioning (claim existing PVs) based on their label. However, it seems that the persistentvolume-controller is trying to provision storage dynamically, as when I kubectl desribe pvc…
maze
  • 162
  • 1
  • 8
1
vote
1 answer

Terraform and Kubernetes' StorageClass with node affinity

Im able to make a number of kubernetes constructs in terraform and even have done so for my ephemeral stateful data that requires low latency disk performance. I can terraform up a kubernetes_persistent_volume but trying to do so with node_affinity…
0
votes
0 answers

K8S volume binding delays

I'm using k3d for local development. I have 3 agent nodes, each with their own specific locally mounted folders for specialized tasks. I'm deploying gitea to agent-0 as a local repo mirror, which has mounted local-storage at /git, and it works…
0
votes
0 answers

Unexpected subPath Behavior in Kubernetes: Auto-Created Directories with Root Ownership and Permission Issues

I’m observing unexpected behavior when using subPath in a Kubernetes Pod’s volume mount. Pod Definition: apiVersion: v1 kind: Pod metadata: name: my-pod spec: containers: - name: main-container image: busybox command: ["sh", "-c",…
0
votes
0 answers

Longhorn Replicas Not Allocating on Worker Node 3

I've installed Longhorn on my Kubernetes cluster and configured specific settings, such as the default data path, over-provisioning (50% of the available space, with each node having 200GB, so 100GB is allocated), auto replica balancing, and…
0
votes
1 answer

Has anyone gotten Kubernetes ImageVolume working, preferably in Minikube?

I'm trying to Use an Image Volume With a Pod, but having no luck. Wondering if someone has ever gotten it working? My Setup: bash-3.2$ minikube version minikube version: v1.34.0 commit: 210b148df93a80eb872ecbeb7e35281b3c582c61 bash-3.2$ kubectl…
1
2