Create GCR secret error: exactly one NAME is required, got 26

Solution 1:

It seems that you are using (Unicode RIGHT DOUBLE QUOTATION MARK) instead of " (ASCII 0x22), which is confusing your shell.

Solution 2:

If you're on windows use ' rather than "

Solution 3:

Future readers. Watch out for any spaces.

Bad:

kubectl create configmap special-config --from-literal=special.how=very --from-literal= special.type='charm'

error: exactly one NAME is required, got 2

Works:

kubectl create configmap special-config --from-literal=special.how=very --from-literal=special.type='charm'

configmap "special-config" created

Note the space before "special.type" in the bad example.

Solution 4:

My issue was that I copied and pasted the command from a browser to a terminal. Typing the code directly into the terminal solved the issue.