Questions tagged [kubernetes-statefulset]

357 questions
2
votes
1 answer

getting count of pods in a StatefulSet at runtime

Is there a way to get the replica count at runtime within a pod that belongs to a StatefulSet? I have verified that the following answer https://stackoverflow.com/a/54306021/5514015 gives you the hostname of the pod, which includes the pod ordinal…
jim
  • 41
  • 2
2
votes
1 answer

deploy control-center gridgain for ignite

I have an ignite cluster and I try to add a control center of gridgain according to their documentation: https://www.gridgain.com/docs/control-center/latest/installation/kubernetes(see deployment.yaml below) but I keep getting this error $ kubectl…
NoamiA
  • 521
  • 4
  • 19
2
votes
1 answer

How to use a storage class for StateFulSet? Do I have to create a PVC?

How to use a storage class for statefulset? I've created the StorageClass. I also created PVC but i'm a bit confused if PVC needs to be create since PVC already requests storage and volumeClaimTemplates also requests storage. Eitherway its not…
user630702
  • 2,529
  • 5
  • 35
  • 98
2
votes
2 answers

Upgrade (Deployment + PVC) to Statefulset using helm

We have realised the mistake of using a Deployment with a PVC for our stateful app instead of going with Statefulset. I was wondering how the upgrade would work. How can I point to the old data with the new statefulset ? I am guessing that the old…
Arunmu
  • 6,837
  • 1
  • 24
  • 46
2
votes
1 answer

How can I mount a hostpath into a statefulset?

How can I mount a hostPath into each pod in a statefulset when I don't know the names of the nodes in advance (so can't pre-create a PV on each node)? I want to set up an elasticsearch cluster on a number of nodes, mounting each elasticsearch data…
GDev
  • 428
  • 1
  • 5
  • 14
2
votes
1 answer

Kubernetes statefulset with NFS persistent volume

I have a kubernetes cluster and I have a simple deployment for mongodb with NFS persistent volume set. It works fine, but since resources like databases are stateful I thought of using Statefulset for the mongodb, but now the problem is, when I go…
Jananath Banuka
  • 2,951
  • 8
  • 57
  • 105
2
votes
0 answers

Control node/pod affinity of individual pods of statefulset in kubernetes cluster

I want to control the node affinity of individual pods of a same statefulset. Say, I have a cluster on cloud of 3 nodes and each node belongs to a different zone. My statefulset resource has 6 replicas and needs to follow below constraints. 1.…
2
votes
2 answers

Can 3 replicas use the same PersistentVolume in a StatefulSet in Kubernetes?

I created a StatefulSet for running my NodeJS with 3 replicas and want to attach to a gce disk that can become a data storage for user to upload files. My project naming: carx; Server name: car-server However I got an error while creating the second…
2
votes
1 answer

RabbitMQ Install - pod has unbound immediate PersistentVolumeClaims

I am trying to do a install of RabbitMQ in Kubernetes and following the entry on the RabbitMQ site https://www.rabbitmq.com/blog/2020/08/10/deploying-rabbitmq-to-kubernetes-whats-involved/. Please note my CentOS 7 and Kubernetes 1.18. Also, I am…
Julie
  • 63
  • 10
2
votes
1 answer

Should I use k8s statefulsets directly or mysql-operator to deploy master-slave mysql cluster?

So I want to deploy a master-slaves MySQL cluster in k8s. I found 2 ways that seem popular: The first one is to use statefulsets directly from k8s official document: https://kubernetes.io/docs/tutorials/stateful-application/basic-stateful-set/ The…
2
votes
3 answers

StatefulSet without service and rollback support yaml

I need to deploy pod with Persistent volume claim support and at the same time, I also need support for modification of pod(edit any configuration) and also rollback to the previous version of the previous container image version. I went through…
2
votes
1 answer

unable to deploy EFK stack on kubernetes (using kubespray)

i'm trying to deploy EFK stack on production kubernetes cluster (installed using kubespray), we have 3 nodes, 1 master + 2 workers, i need to use elasticsearch as a statefulset and use a local folder in master node to store logs (local storage for…
2
votes
3 answers

How to ensure every kubernetes node running 2 or more pods?

I know that DaemonSets ensure only one pod running in every node. I know that ReplicaSets ensure the number of pod replicas defined are running but doesn't ensure every node gets a pod. My requirement is every Node should be occupied by one POD and…
2
votes
1 answer

How to share persistent volume of a StatefulSet with another StatefulSet?

I have a StatefulSet-1 running with 3 replicas & each pod writing logs to its own persistent volume say pv1,pv2,pv3 (achieved using volumeClaimTemplates:) I have another StatefulSet-2 running with 3 replicas & I want each POD of StatefulSet-2 access…
2
votes
2 answers

Kubernetes: StorageClass with local provisioner and StatefulSet kind

One of my pods has 'StatefulSet' kind with volumeClaimTemplates section referring to a StorageClass(SC) I created, see below. SC: apiVersion: storage.k8s.io/v1 kind: StorageClass metadata: name: local-storage provisioner:…