Questions tagged [kubernetes-secrets]

415 questions
17
votes
4 answers

Does Kubernetes take JSON format as input file to create configmap and secret?

I have an existing configuration file in JSON format, something like below { "maxThreadCount": 10, "trackerConfigs": [{ "url": "https://example1.com/", "username": "username", "password": "password", …
user1684651
  • 390
  • 1
  • 8
  • 21
16
votes
2 answers

Kubernetes: How to set boolean type variable in configMap

I want to set a boolean variable in configMap (or secret): apiVersion: v1 kind: ConfigMap metadata: name: env-config namespace: mlo-stage data: webpack_dev_server: false But when I apply it, I get the following error: The request is invalid:…
Ken Tsoi
  • 1,195
  • 1
  • 17
  • 37
15
votes
2 answers

Kubernetes Volume Mount Permissions Incorrect For Secret

I am mounting a k8s secret as a volume mount, and the files in the pod have the wrong permissions. In my Deployment I have this entry in the volumes array: - name: ssh-host-keys secret: secretName: ftp-ssh-host-keys …
13
votes
1 answer

Use a single volume to mount multiple files from secrets or configmaps

I use one secret to store multiple data items like this: apiVersion: v1 kind: Secret metadata: name: my-certs namespace: my-namespace data: keystore.p12: LMNOPQRSTUV truststore.p12: ABCDEFGHIJK In my Deployment I mount them into files like…
Hedge
  • 16,142
  • 42
  • 141
  • 246
13
votes
3 answers

How to update secret with "kubectl patch --type='json'"

I created a secret like this: kubectl create secret generic test --from-literal=username=testuser --from-literal=password=12345 I want to update the username to testuser2 but I want to do it only with kubectl patch --type='json'. This is how I…
E235
  • 11,560
  • 24
  • 91
  • 141
13
votes
3 answers

How to Refresh Worker Secrets Without Killing Deployment?

I want to learn how to update secrets in worker pods without killing and recreating the deployment. Currently pods pull in secrets to as env vars with: env: - name: SECRET_ACCESS_KEY valueFrom: secretKeyRef: …
ProGirlXOXO
  • 2,170
  • 6
  • 25
  • 47
13
votes
1 answer

Are multiple imagePullSecrets allowed and used by Kubernetes to pull an image from a private registry?

I have a private registry (gitlab) where my docker images are stored. For deployment a secret is created that allows GKE to access the registry. The secret is called deploy-secret. The secret's login information expires after short time in the…
sceee
  • 1,681
  • 19
  • 34
12
votes
2 answers

Kubernetes - Use secrets on pre-install job

On my helm chart I have a job with the pre-install hook where I need to use a property from my secrets. However when I try to install my helm chart I get the following error on my pre-install job: Error: secret "SecretsFileName" not found Secrets…
Ninita
  • 1,209
  • 2
  • 19
  • 45
12
votes
1 answer

Insert all secrets as env variables into kubernetes deployment

I have dozens of secrets to pass into a k8 deployment which becomes very verbose, bellow is an example of passing the redis secrets in from the redis-secrets secret. - name: REDIS_HOST valueFrom: secretKeyRef: name: redis-secrets …
henry.oswald
  • 5,304
  • 13
  • 51
  • 73
11
votes
6 answers

Injecting vault secrets into Kubernetes Pod Environment variable

I'm trying to install Sonarqube in Kubernetes environment which needs PostgresSQL. I'm using an external Postgres instance and I have the crednetials kv secret set in Vault. SonarQube helm chart creates an Environment variable in the container which…
10
votes
3 answers

Kubernetes ingress controller not able to find the certificate secret

I am setting up a secret containing the certificate for ingress controller but getting the below error when I check the ingress logs Ingress logs: W0304 05:47:32.020497 7 controller.go:1153] Error getting SSL certificate "default/auth-tls":…
Divya Vyas
  • 323
  • 1
  • 4
  • 16
9
votes
5 answers

How to generate a random string / password in Kubernetes secrets

For now, I deploy my application pods using static files and one of them is app-secrets.yaml with all secrets to deploy an application --- apiVersion: v1 kind: Secret metadata: name: app-secrets type: Opaque data: root: xxxxxx user1: xxxxxx …
Baptiste Mille-Mathias
  • 2,144
  • 4
  • 31
  • 37
9
votes
2 answers

Kubernetes Secret TLS Certificate P12 and Spring Boot Deployment doesn't work

I'm currently stuck and don`t know how to proceed. This is my Spring Boot…
8
votes
1 answer

How to have ASP.NET Core running locally with HTTPS in Kubernetes

I currently have a docker-compose setup for ASP.NET Core. However when moving to test the cluster in Kubernetes I ran into SSL issues with Kestrel. Originally with Docker/Docker-compose you can set up local SSL with dotnet dev-certs https -ep…
mjwrazor
  • 1,866
  • 2
  • 26
  • 42
8
votes
1 answer

If I update a secret, does it automatically gets updated to all resources in which it is volume mounted?

I have a secret, and I mounted it as a volume inside a deployment. If I update the secrets value later, will the new updated value gets automatically reflected as well inside the deployment pods which I volume mounted the secret? Note: I am…
Jplus2
  • 2,216
  • 2
  • 28
  • 49
1
2
3
27 28