Questions tagged [kubernetes-secrets]

415 questions
0
votes
1 answer

Clarification on the security of using secretKeyRef in Kubernetes manifest

I was looking into an entirely separate issue and then came across this question which raised some concerns: https://stackoverflow.com/a/50510753/3123109 I'm doing something pretty similar. I'm using the CSI Driver for Azure to integrate Azure…
cjones
  • 8,384
  • 17
  • 81
  • 175
0
votes
1 answer

Using variables in Kubernetes via secret file

I'm trying to use variables from a secret in a line in confMap. The deployment is deploying an app which needs to connect to a MongoDB server via a url. The url is in a confMap and the username and the password are variables stored in the…
0
votes
1 answer

Spring Boot App can't access PostgreSQL using credentials from Kubernetes secret

I'm not an expert when it comes to Kubernetes so, for learning, I started building a simple Spring Boot web application (called meal-planner) which reads and writes to a PostgreSQL database. PostgreSQL and Spring Boot app are deployed in Kubernetes…
0
votes
1 answer

Kubectl apply -f mongo-secret.yaml is not creating the secret inside my config file

When I run the below command, Kubectl apply -f mongo-secret.yaml I'm thrown the following error, Below is the Secret configuration I used, apiVersion: v1 kind: secret metadata: name: mongodb-secret type: opaque data: mongo-root-username:…
0
votes
2 answers

How to find Kubernets secrets values

What could be the kubectl command to see k8s secret values I tried kubectl get secrets/ -n It returns NAME TYPE DATA AGE secrets1 Opaque 1 18h but I want to know what value stored inside…
Dupinder Singh
  • 7,175
  • 6
  • 37
  • 61
0
votes
1 answer

Helm - how to add secrets for subchart from repo?

I installed mongodb chart from bitnami as follows helm install mongodb bitnami/mongodb which created this file ./charts/mongodb-10.15.2.tgz What I do not understand and what I cant find is how to link Secrets to these kind of subcharts. I am…
0
votes
2 answers

passing application configuration using K8s configmaps

How to pass in the application.properties to the Spring boot application using configmaps. Since the application.yml file contains sensitive information, this requires to pass in secrets and configmaps. In this case what options do we have to pass…
zilcuanu
  • 3,451
  • 8
  • 52
  • 105
0
votes
2 answers

How to use hyphen key with hyphen in kubernetes secret?

I want to inject the following secret key/value in pods: test-with=1 and testwith=1. First I create the secret: kubectl create secret generic test --from-literal=test-with=1 --from-literal=testwith=0 Then I create a yaml file for a pod with the…
Xaving
  • 329
  • 1
  • 11
0
votes
1 answer

How to copy kubernetes/openshift secrets into a volume for init container job?

There is a init container which copies keystore.jks from nexus repo into a volume during the build of docker file via curl. Then once the init container is alive the python code that takes that keystore.jks and makes necessary updates then init…
0
votes
1 answer

Kubernetes secret programmatically update

Is there a way to programmatically update a kubernetes secret from a pod? that is, not using kubectl. I have a secret mounted on a pod and also exposed via an environment variable. I would like to modify it from my service but it looks that it's…
Jorge
  • 1,353
  • 10
  • 25
0
votes
1 answer

Vault on k8s without admin rights

I am trying to install the Hashicorp Vault in my k8s available on Openshift environment, but unfortunately I don't have admin rights and the IT department said that it is not possible to provide this admin right. Is there another option for a vault…
0
votes
1 answer

How to inject secrets from Google Secret Manager into K8s pod?

What is the best practice for injecting a secret from Google Secret Manager into a Kubernetes deployment? I have stored the admin password for my Grafana instance into Google Secret Manager. The Grafana instance was deployed using a helm chart on…
Riley Hun
  • 2,541
  • 5
  • 31
  • 77
0
votes
0 answers

Kubernetes Secrets per environment

I'm using helm chart to deploy pods to multiple environments. I would like to have one secret file for each environment like dev, sit. I have created secrets.yaml file which is referencing values.yaml of each environment. apiVersion: v1 kind:…
heart_coder
  • 189
  • 13
0
votes
1 answer

Ansible create kubernetes secret from file

Is it possible to create and k8s secret from a file in ansible? Currently, I am doing it like this but it only works on the first run because if I run the playbook again it says the secret already exists - name: generate keypair openssh_keypair: …
Ydrab
  • 21
  • 1
  • 5
0
votes
1 answer

Read secret values from mounted volumes from Spring mvc application

We have a spring MVC application deployed using tomcat image in AKS. How to get values from Secrets mounted as volumes? Most of the examples points to spring boot only I am mounting values from secret store kind: Pod apiVersion: v1 metadata: …