Questions tagged [kubernetes-secrets]

415 questions
8
votes
2 answers

livenessProbe with secret not working in kubernetes

I am trying to pass livenessProbe in my kubernetes deployment yaml file to perform the health of my application. so, I created a secret with token value and passing as below livenessProbe: httpGet: path: test/actuator/health …
magic
  • 254
  • 2
  • 10
  • 19
8
votes
1 answer

Inject secret value to configmap during deployment without using environment variables

I have a configmap like this apiVersion: v1 kind: ConfigMap metadata: namespace: develop name: test-config data: app.conf: | connection conn1 address 127.0.0.1:8080 user cluster1 password: app.conf…
jmhostalet
  • 4,399
  • 4
  • 38
  • 47
7
votes
2 answers

GKE Secrets OR Google Secret manager

Does anyone know in which case choose Kubernetes secrets instead of google secret manager and the reverse ? Differences between the two ?
7
votes
1 answer

How to set kubernetes secret key name when using --from-file other than filename?

Is there a way to set a kubernetes secret key name when using --from-file other than the filename? I have a bunch of different configuration files that I use as secrets.json within my containers. However, to organize my files, none of them are named…
Joel Magnuson
  • 313
  • 2
  • 10
7
votes
3 answers

How to fix 'map[] does not contain declared merge key: name' error when I edit and save the pod yaml?

I 'm trying to pull an image from a private registry. But the status of pod is 'ImagePullBackOff', which means I need to add a secret to the pod. Events: Type Reason Age From …
Xiang Li
  • 71
  • 1
  • 1
  • 4
6
votes
1 answer

Reading secrets from Kubernetes within Python based app

I’m packaging a Python app for use within a Kubernetes cluster. In the code base this method exists : def get_pymongo_client(self): username = test; password = 'test'; url = ‘test conn_str = "mongodb+srv://" +…
blue-sky
  • 51,962
  • 152
  • 427
  • 752
6
votes
1 answer

What happens if a configMap(/secret) mounted as a volume in a running pod, is deleted on the master?

Let's say I have a pod with a configMap (or secret) volume. ConfigMap (or secret) object is present during the pod's creation, but I delete the configMap(or secret) object on the master, while the pod is running. What is the expected behavior? Is it…
5
votes
1 answer

K8s Operator listen to secret change with event filter

We have created a few month ago controller which runs great using kubebuilder. Few weeks ago we added a “listener” to a secret which when the secret is changing (secret properties) The reconcile should be invoked, the problem is that it is sometimes…
Jenney
  • 171
  • 6
  • 18
5
votes
1 answer

How can I remove dependency of secrets from application pod in K3s cluster

I am having a k3s cluster with my application pods running. In all the pods when I login ( with kubectl exec -n -it /bin/bash command ) there is kubernetes.io directory which contain secret token that anyone can get if they do cat…
5
votes
1 answer

kubernetes deployment mounts secret as a folder instead of a file

I am having a config file as a secret in kubernetes and I want to mount it into a specific location inside the container. The problem is that the volume that is created inside the container is a folder instead of a file with the content of the…
zozo6015
  • 557
  • 2
  • 11
  • 27
5
votes
4 answers

One liner command to get secret name and secret's token

What's the one liner command to replace 2 commands like below to get the Kubernetes secret's token? Example usecase will be getting token from kubernetes-dashboard-admin's secret to login and view kubernetes-dashboard. Command example: $ kubectl…
Ryan
  • 3,085
  • 5
  • 27
  • 31
5
votes
3 answers

How to use Kubeseal to seal a helm-templated secret?

Imagine a secret like this: apiVersion: v1 kind: Secret metadata: name: {{ include "test-cicd.fullname" . }} labels: app.kubernetes.io/name: {{ include "test-cicd.name" . }} helm.sh/chart: {{ include "test-cicd.chart" . }} …
Milad
  • 608
  • 1
  • 6
  • 14
5
votes
3 answers

kubernetes secret items not mounted as file path

I have the following yaml: volumeMounts: - name: app-secret mountPath: /app readOnly: true volumes: - name: app-secret secret: secretName: app-secret items: - key:…
Kok How Teh
  • 3,298
  • 6
  • 47
  • 85
5
votes
3 answers

HashiCorp Vault to populate kubernetes secrets

Recently I learned about HashiCorp Vault and its usage combined with Kubernetes. I've found two really awesome blog post about how you can use HashiCorp Vault to generate creds on the fly by using an init-container and shared volume (post1, post2).…
4
votes
3 answers

How to set an SpringBoot array property as a kubernetes secret?

I want to use the direct translation from k8s secret-keys to SpringBoot properties. Therefore I have a helm chart (but similar with plain k8s): apiVersion: v1 data: app.entry[0].name: {{.Values.firstEntry.name | b64enc }} kind: Secret metadata: …
towi
  • 21,587
  • 28
  • 106
  • 187
1 2
3
27 28