I have a config I need to apply from kubectl, but I don't quite understand what it is:
apiVersion: v1
kind: ConfigMap
data:
localHosting.v1: |
host: "localhost:1234"
containerHost: "container-name:5555"
I can't figure out how to make this configmap using a kubectl create configmap
invocation though. I thought that ConfigMaps were just key-value pairs, and the usage of the --from-literal
flag seems to expect that, but this config seems to have an additional level of nesting.
I know you could typically create a YAML file or pipe in the whole YAML file using a heredoc, but that's not a very good solution in my situation. Is there a way to craft kubectl create configmap
command to do this?