When using the latest version of Kubectl (1.21.2) against this repo, a kustomize panic occurs. The kustomize works fine under 1.19.x
❯ kubectl version
Client Version: version.Info{Major:"1", Minor:"21", GitVersion:"v1.21.2", GitCommit:"092fbfbf53427de67cac1e9fa54aaa09a28371d7", GitTreeState:"clean", BuildDate:"2021-06-16T12:52:14Z", GoVersion:"go1.16.5", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"19", GitVersion:"v1.19.7", GitCommit:"1dd5338295409edcfff11505e7bb246f0d325d15", GitTreeState:"clean", BuildDate:"2021-01-13T13:15:20Z", GoVersion:"go1.15.5", Compiler:"gc", Platform:"linux/amd64"}
WARNING: version difference between client (1.21) and server (1.19) exceeds the supported minor version skew of +/-1
❯ kubectl kustomize .
panic: runtime error: index out of range [145] with length 145 [recovered]
panic: runtime error: index out of range [145] with length 145
goroutine 1 [running]:
k8s.io/kubernetes/vendor/gopkg.in/yaml%2ev3.handleErr(0xc001381900)
/private/tmp/kubernetes-cli-20210618-25558-1v844fk/_output/local/go/src/k8s.io/kubernetes/vendor/gopkg.in/yaml.v3/yaml.go:276 +0x8d
panic(0x599ea20, 0xc003718c30)
Summary
When using the latest version of Kubectl (1.21.2) against this repo, a kustomize panic occurs. The kustomize works fine under 1.19.x