I want to transfer some key-value data, about 1kb~10kb, into a pod in kubernetes. Is there a simple way to achieve this? I don't want to create a configmap each time, because this will happen many many times... Thank you in advance.
Best method to achieve this is to make a file locally and fill the file with your config (key-val pairs) then lets say /tmp/foo.properties
is your file containing key-val pairs locally to mount this file in a pod just copy with following command
kubectl cp /tmp/foo <some-namespace>/<some-pod>:/tmp/foo.properties
your file will be present in /tmp/foo.properties
You can do with kubectl cp command to copy files into pod.
Other way is to create REST endpoint in the service running inside pod and POST the file to the endpoint.