Open panuhorsmalahti opened 2 years ago
I suspect the bug is that in Lens the YAML is converted to JSON/POJO, where the binary is converted as an array of numbers, but with kubectl apply it's using Go's unmarshaling library, which does it differently. I noticed that online YAML -> JSON converters convert !!binary
to number array instead of string.
Describe the bug If a resource is created that uses yaml binary encoding, an error is displayed:
error: error validating "/private/var/folders/_j/ztr5t9y90jq_jpsz1s2ytvk40000gp/T/c2e945a68a4e9610d06d3dc88eb2e662/resource.yaml": error validating data: ValidationError(Pod.spec.containers[0].image): invalid type for io.k8s.api.core.v1.Container.image: got "map", expected "string"; if you choose to ignore these errors, turn validation off with --validate=false
.The same resource can be created with
kubectl apply
using Lens terminal.To Reproduce Steps to reproduce the behavior:
Expected behavior Resource is created.
Actual behavior Error notification is displayed.
Environment (please complete the following information):
make dev
Additional context I was using a Lens DevCluster.