I'm trying to edit a kubernetes secret using:
kubectl edit secret mysecret -o yamlAnd adding a new variable on data:
data:
NEW_VAR: trueBut I receive the error:
cannot restore slice from bool
If I try to use some number, like:
data:
NEW_VAR: 1I receive another error after close the editor:
cannot restore slice from int64
What this error means?
This error happens when the variable is not a valid base64 value.
So, to use the value true, you need to use his base64 representation:
NEW_VAR: dHJ1ZQ==