Copy SSL certificate file(Server.crt) and key file(server.key) to pod

I have an image with an application running on it.I use this image in a pod.
Pod needs certificate and key from a path to make ssl connection

I have to copy SSL certificate and key to the pod(using the image above, docker file has CP command) and know the path where it is copied

I dont want to do it in docker file (copy certificate and key in image itself)

how can i do that?

You need to create a configmap object in Pod manifest. The configmap data contains the certificate and the key.

If you wants to do directly then you can use “kubectl cp” command.

my application have a config file that needs the path of location where crt and key are places in pod.
so i need:
1 a path in pod for crt and key
2 how to copy crt and key to pod OR how can pod access crt and key
3.when deployement (kubectl apply xxxx OR helm ) happens , crt and key should reach pod

need more clarification. my application have a config file that needs the path of location where crt and key are places in pod. so i need:
1 a path in pod for crt and key
2 how to copy crt and key to pod OR how can pod access crt and key
3.when deployement (kubectl apply xxxx OR helm ) happens , crt and key should reach pod
when my application gets deployed it will use helm(kubeclt apply xx for now)
how will each node in cluster get crt and key that each pod can get from node at run time

I am confused here! I can easily give env variables by configmap or secrets but how to give physical file?