Questions tagged [kubernetes-statefulset]
357 questions
0
votes
1 answer
Graceful scaledown of stateful apps in Kubernetes
I have a stateful application deployed in Kubernetes cluster. Now the challenge is how do I scale down the cluster in a graceful way so that each pod while terminating (during scale down) completes it’s pending tasks and then gracefully shuts-down.…

Balu R
- 87
- 1
- 1
- 10
0
votes
1 answer
How to extract volumeClaimTemplates to a separate PersistentVolumeClaim yaml file?
Let's say I have a StatefulSet definition
apiVersion: v1
kind: StatefulSet
metadata:
name: web
spec:
...
volumeClaimTemplates:
— metadata:
name: www
spec:
resources:
requests:
storage: 1Gi
This will create…

LEQADA
- 1,913
- 3
- 22
- 41
0
votes
1 answer
K8S: Pass the runAsUser permission to files created inside container
Let's say I have the below yaml:
spec:
securityContext:
fsGroup: 5678
serviceAccountName: some-account
volumes:
- name: secrets
secret:
secretName: data-secrets
- name: secrets-sftp-passwd-key
secret:
…

user1452759
- 8,810
- 15
- 42
- 58
0
votes
1 answer
Kubernetes MongoDB replicaset creation failed
What i intended to do:
Setup Kubernetes in Digital Ocean
Configure MongoDB replicaset in kubernetes
EDIT: Steps that i used to setup Kubernetes
Steps to setup master node:
Docker Setup using :…

RajKrishnan
- 149
- 4
- 16
0
votes
1 answer
How to run a command on PersistentVolume creation?
I have a StatefulSet which looks like this
apiVersion: v1
kind: StatefulSet
metadata:
name: web
spec:
...
volumeClaimTemplates:
— metadata:
name: www
spec:
resources:
requests:
storage: 1Gi
It will create a…

LEQADA
- 1,913
- 3
- 22
- 41
0
votes
1 answer
cant run mysql statefulset in kubernetes
I've just started learning kubernetes and was playing around in katakoda platform. I created a statefulset for mysql. It is just a test so i didnt declare any pvc and mount any volumes. It's declaration and the service's declaration in…

Ivan Koblyk
- 29
- 4
0
votes
1 answer
Kubernetes - writing data to volume of StatefulSet
I am trying to create a StatefulSet. I want to create a file on the attached volume so i am using this command touch /data/test.txt but it seems like the container crashes because of that. Why would it do that? If i don't use the command everything…

Arpan Solanki
- 817
- 1
- 17
- 28
0
votes
1 answer
Why to deploy spark with statefulset instead of normal deployment in k8s platform?
I've investigated a couple of helm charts for apache spark deployment and found that most of them use statefulset for deployment instead of normal k8s deployment resource.
E.g. the microsoft/spark uses normal deployment while bitnami/spark prefers…

Russell Bie
- 341
- 2
- 11
0
votes
1 answer
How to configure side-car of StatefulSet to use persistent-volume of main container?
I have a statefulset, I want to add another container-2 for that statefulset & I want that container-2 to access container-1's pv's (created using volumeClaimTemplates:)
Any way we can achieve above?

sudhir tataraju
- 1,159
- 1
- 14
- 30
0
votes
2 answers
Statefulset's replica scheduling questions
Is there anyway I can tell Kuberbetes how to schedule the replicas in the statefulset? For example, I have nodes divided into 3 different availability zones (AZ). I have labeled these nodes accordingly. Now I want K8s to put 1 replica in each AZ…

Kenneth
- 561
- 1
- 5
- 13
0
votes
1 answer
Rollout restart statefulset using kubectl proxy
I have started kubectl proxy from within my pods and am able to access kubernetes APIs. I have a need to restart my statefulset.
Using kubectl, I would done this:
kubectl rollout restart statefulset my-statefulset
However, I would like to do this…

Santosh Kewat
- 522
- 6
- 19
0
votes
1 answer
PVC created with no accessmode and storage class
I am using the following yaml to deploy Keydb into my cluster
---
# Source: keydb/templates/cm-utils.yaml
apiVersion: v1
kind: ConfigMap
metadata:
name: keydb-utils
labels:
helm.sh/chart: keydb-0.8.0
app.kubernetes.io/name: keydb
…

Pardha
- 27
- 4
0
votes
1 answer
Providing the persistent volume of standard type for statefulSet fails
I get the following errors in the cloud console after the deployment of a statefulset (bitnami/redis) with the PVC:
(combined from similar events): Failed to provision volume with StorageClass "standard": googleapi: Error 503: Internal error.…

alexjet
- 11
0
votes
2 answers
Using an environment variable in a file docker container
I am setting an environment variable in a docker container whose value I receive at run time.
env:
- name: POD_INFO
value: {{ Values.resolved_when_the_container_starts }}
I want to use this value inside an XML file. Is there a way I can…

The_Lost_Avatar
- 992
- 5
- 15
- 35
0
votes
0 answers
Kubernetes: Replicated stateful nginx loadbalancer with shared service
I searching for a possibility to have mirrored pods of a nginx loadbalancer deployment in kubernetes that alle share the same kubernetes service with one single external IP.
I tried the scenario with this statefulset config:
apiVersion:…