I have kubernetes secrets as following and want to copy all content as is to single file.
api:
url: https://app.a.com/test
application:
metadata: name="myname"
in yaml i have following
apiVersion: apps/v1
kind: Deployment
metadata:
name: active-mq
labels:
app: active-mq
spec:
replicas: 1
selector:
matchLabels:
app: active-mq
template:
metadata:
labels:
app: active-mq
spec:
containers:
- image: [name-of-my-image-from-docker-hub]
name: active-mq
imagePullPolicy: Always
resources:
requests:
memory: 500Mi
cpu: 200m
limits:
memory: 1000Mi
cpu: 400m
volumeMounts:
- name: active-creds
mountPath: /home/my.properties
subPath: my.properties
volumes:
- name: active-creds
secret:
secretName: creds
restartPolicy: Always
when i bash to container i see it create the directory name as my.properties
under /home
. is that something i am missing here?
I am expecting my.properties should contain following
api:
url: https://app.a.com/test
application:
metadata: name="myname"