I'm trying to edit a kubernetes secret using:
kubectl edit secret mysecret -o yaml
And adding a new variable on data
:
data:
NEW_VAR: true
But I receive the error:
cannot restore slice from bool
If I try to use some number, like:
data:
NEW_VAR: 1
I 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==