Want to understand if it's possible to create a configmap with a blank or empty key. The value isn't empty though.
No, it is not possible. While the YAML syntax allows for an empty string to be specified as the key, Kubernetes validation will not accept it:
$ cat test-cm.yaml
apiVersion: v1
data:
key1: value1
key2: value2
"": value3
kind: ConfigMap
metadata:
name: test-cm
$ kubectl apply -f test-cm.yaml
The ConfigMap "test-cm" is invalid: data[]: Invalid value: "": a valid config key must consist of alphanumeric characters, '-', '_' or '.' (e.g. 'key.name', or 'KEY_NAME', or 'key-name', regex used for validation is '[-._a-zA-Z0-9]+')
$
The validation regexp printed in the error message [-._a-zA-Z0-9]+
clearly states that the key length may not be zero.
Using the null key is also unacceptable to Kubernetes:
$ cat test-cm.yaml
apiVersion: v1
data:
key1: value1
key2: value2
?
: value3
kind: ConfigMap
metadata:
name: test-cm
$ kubectl apply -f test-cm.yaml
error: error converting YAML to JSON: Unsupported map key of type: %!s(<nil>), key: <nil>, value: "value3"
$