Questions tagged [kubernetes-statefulset]

357 questions
0
votes
1 answer

K8S - how to separate Pod definition from StatefulSet definition

In the example below, the Pod definition is embedded in the StatefulSet definition. Is there a way to separate the Pod definition to refer to a separately defined Pod definition?
mon
  • 18,789
  • 22
  • 112
  • 205
0
votes
1 answer

Kubernetes initContainers to copy file and execute as part of Lifecycle Hook PostStart

I am trying to execute some scripts as part of statefulset deployment kind. This script I have added as configmap and I use this as volumeMount inside the pod definition. I use the lifecycle poststart exec command to execute this script. It fails…
Brijesh Shah
  • 573
  • 6
  • 18
0
votes
1 answer

RabbitMQ in Kubernetes - Create User as part of Statefulset deployment kind

I am new to the Kubernetes and learning by experimenting. I have created RabbitMQ statefulset and it's working. However, the issue I am facing is the way I use it's admin portal. By default RabbitMQ provides the guest/guest credential but that works…
Brijesh Shah
  • 573
  • 6
  • 18
0
votes
0 answers

Connecting spring boot to postgres statefulset in Kubernetes

I'm new to Kubernetes and I'm learning about statefulsets. For stateful applications, where the identity of pods matter, we use statefulsets instead of simple deployments so each pod can have its own persistent volume. The writes need to be pointed…
joe1531
  • 345
  • 4
  • 16
0
votes
1 answer

MySQL + Kubernetes statefulset with defined env variables

I'm following Kubernetes's MySQL as a StatefulSet from here. What the tutorial did not cover is how do I specify other environmental variables, like MYSQL_ROOT_PASSWORD, MYSQL_USER and such. I tried doing it myself, but didn't work. Here's the…
felixbmmm
  • 362
  • 3
  • 13
0
votes
1 answer

How to use to kubectl to patch statefulset envFrom

I have a Kubernetes Statefulset and im using envFrom to add environment variables from ConfigMaps and Secrets, by defining configMapRefs and secretRefs in an 'extra-values.yaml' file and including that file in my helm install command. The…
Steve
  • 347
  • 3
  • 11
0
votes
0 answers

Redis bitnami Helm Chart FAILED statefulset.yaml nil pointer evaluating interface {}.BasePath

I am very new to Kubernetes and cant seem to fix this issue. I am trying to install bitnami/redis helm chart but receive the following error: Error: INSTALLATION FAILED: template: redis/templates/replicas/statefulset.yaml:40:44: executing…
0
votes
1 answer

establish inter pod comunication of same service on chat app

I am designing a chat like application where I am running 2 pods of same service for scalability. Now assume user 1 connected to pod1 through web socket connection and user 2 connected to pod2. User1 want to interact with user2 but both got…
0
votes
0 answers

Readiness probe failure for Postgres because of "root"

I am trying to execute the very standard SELECT 1 command as a readiness probe command. I've been through numerous posts on Postgres, root user and Kubernetes but I still can't get it right although this might be trivial. I defined ENV variables…
NevD
  • 265
  • 2
  • 10
0
votes
1 answer

How to deploy Grafana as a Replicated Statefulset in Kubernetes?

I need to deploy Grafana in a Kubernetes cluster in a way so that I can have multiple persistent volumes stay in sync - similar to what they did here. Does anybody know how I can use the master/slave architecture so that only 1 pod writes while the…
0
votes
0 answers

Can we edit PV on runtime in EKS to map it to a different EBS volume?

Use case I want to restore data in my statefulset. So, lets say I have got the snapshot and restored the EBS volume. Now I want my pv object to point to the new EBS volume so that my pod can consume to the restored data. How can I do that…
Aman
  • 193
  • 2
  • 15
0
votes
1 answer

In StatefulSet, how long does the pod keep trying to if they keep on failing due to ImagePullBackOff?

I have a Kubernetes cluster, and I am studying the behaviour of Kubernetes pod in case of failure. So in my single master 2 worker node Kubernetes cluster, that has one StatefulSet deployed. If I inject a failure(intentionally) by changing the image…
0
votes
1 answer

How to wait for StatefulSet using Ansible's community.kubernetes.k8s_info module

Ansible has a great community.kubernetes module. One of the useful flags of k8s_info is wait that is implemented for Deployment, DaemonSet and Pod. For other k8s kinds it will return instantly unless wait_condition is provided. What wait_condition…
0
votes
2 answers

StatefulSet update: recreate THEN delete pods

The Kubernetes StatefulSet RollingUpdate strategy deletes and recreates each Pod in order. I am interested in updating a StatefulSet by recreating a pod and then deleting the old Pod (note the reversal), one-by-one. This is interesting to me…
nurxg
  • 103
  • 3
0
votes
1 answer

Run kubectl patch statefulset in Jenkins pipeline

I need to update statefulset using Jenkins. To be more precise, to update theme in init container. This is the code that I use in Jenkins (it works fine in terminal): kubectl patch statefulset test-deploy -n test -p '{"spec": {"template":…
user15824359
  • 91
  • 1
  • 11