Questions tagged [kubernetes-statefulset]

357 questions
4
votes
1 answer

How to set the Pod DNS in Kubernetes

I wanted to know if there is any way that I can set a DNS for the Pod in the StatefulSet, so I can call them directly. I have read the Kubernetes documentation, but I haven't seen anything useful.
4
votes
1 answer

Can a deployment be completed even when readiness probe is failing

I have an application running in Kubernetes as a StatefulSet that starts 2 pods. It has configured a liveness probe and a readiness probe. The liveness probe call a simple /health endpoint that responds when the server is done loading The readiness…
4
votes
1 answer

Setting ConfigMapRef and SecretRef for Deployment in Golang K8s client

I have got messed with this bug for hours and still dont know why! I created a simple Configmap and a Secret called config1 and secret1 respectively. (Yaml files for these are within this repo: https://github.com/hoangphanthai/test) After that I…
4
votes
2 answers

RabbitMQ fails to start after restart Kubernetes cluster

I'm running RabbitMQ on Kubernetes. This is my sts YAML file: apiVersion: v1 kind: Service metadata: name: rabbitmq-management labels: app: rabbitmq spec: ports: - port: 15672 name: http selector: app: rabbitmq type:…
4
votes
2 answers

Immediately scale up Kubernetes Statefulset/Deployment to full capacity

currently we scaled one of our statefulsets to have 11 replicas. Our current updateStrategy is updateStrategy: type: RollingUpdate If we deploy the statefulset from scratch, Kubernetes starts them one after another. To start one replica it needs…
Stephan
  • 323
  • 2
  • 11
4
votes
1 answer

Expose a redis cluster - with a kubernetes statefulset to the internet

I created a statefulset that deploys a redis image to GCP on kubernetes. The challenge I am having is exposing it using a single domain name. Such that the pods can be accessed in the following order - redis.com/first, redis.com/second,…
David Essien
  • 1,463
  • 4
  • 22
  • 36
4
votes
2 answers

Is there any less hacky way of passing an Ordinal Index to StatefulSet environment variable?

I'm trying to run a zookeeper ensemble and am having an issue passing a unique ID as envrionment varible ZOO_MY_ID as required by official zookeeeper image found here. I've tried reading about this and found similar overflow questions but none…
4
votes
1 answer

Add additional volumeClaimTemplate to statefulSet

We are using Kubernetes 1.10.1 I'm having a statefulset which has a single volumeClaim attached. I would like to add an additional volumeClaim since resizing of an existing PV is still in beta and also not available in Kubernetes 1.10. My change…
mat1010
  • 756
  • 1
  • 9
  • 17
4
votes
2 answers

Is it possible to convert or cast an integer anchor to a string alias in a yaml file?

For my AKS container setup, I would like to pass the requested number of replicas of a given statefulset to each pod through environment variables. I was trying to do this without repeating myself (once in the "replicas" setting and once in the…
Xuntar
  • 2,260
  • 3
  • 21
  • 31
3
votes
0 answers

Migrate Kubernetes storage from vSphere to NFS with StatefulSets

I'm trying to move all my persistent volumes from vSphere to NFS, I managed to do it for many applications that use Deployment kind. All I have to do is: Mount the NFS volume to a different path (/tmp for example) Copy the data from vSphere volume…
3
votes
1 answer

Pod name resolution for StatefulSet doesn't work

I have the following Kubernetes YAML with a StatefulSet I use to deploy a PostgreSQL cluster with Patroni. However, the question is relative to how Kubernetes registers Pod names in CoreDNS. According to this documentation in the Stable Network ID…
3
votes
1 answer

How to update statefulset spec with terraform helm provider

I have a statefulset created using the terraform helm provider. I need to update the value of an attribute (serviceName) in the statefulset but I keep getting the following error Error: failed to replace object: StatefulSet.apps "value" is invalid:…
3
votes
2 answers

Pass statefulset's replica count to it's pod

I have a statefulset and I need to know what is the current replica count from inside the pod. To do so, I tried: apiVersion: apps/v1 kind: StatefulSet metadata: name: sample-mariadb namespace: demo spec: replicas: 3 template: spec: …
3
votes
2 answers

Moving Pod to another node automatically

Is it possible for a pod/deployment/statefulset to be moved to another node or be recreated on another node automatically if the first node fails? The pod in question is set to 1 replica. So is it possible to configure some sort of failover for…
3
votes
1 answer

NODE_APP_INSTANCE similar variable inside kubernetes node app

When we use PM2 in cluster mode, we can find out the instance number inside node app using process.env.NODE_APP_INSTANCE, but how we can find that inside a kubernetes cluster without pm2. I'm looking for similar like find replica instance number or…
1 2
3
23 24