1、配置kubectl edit使用vim。声明EDITOR环境变量后无需其他操作

export EDITOR=vim

2、coredns的configmap格式混乱,使用jq格式化重新edit,“Corefile: |” 的管道符需要保留,返回结果需要添加4个空格

kubectl -n kube-system get cm coredns -o json | jq '.data."Corefile"' -r

3、helm报错

helm ls -A
WARNING: stat /root/.config/helm/registry/config.json: not a directory
/root/.config/helm/registry/config.json
oras.land/oras-go/pkg/auth/docker.NewClientWithDockerFallback
        oras.land/oras-go@v1.2.4/pkg/auth/docker/client.go:80
helm.sh/helm/v3/pkg/registry.NewClient
        helm.sh/helm/v3/pkg/registry/client.go:84
main.newDefaultRegistryClient
        helm.sh/helm/v3/cmd/helm/root.go:287
main.newRootCmd
        helm.sh/helm/v3/cmd/helm/root.go:155
main.main
        helm.sh/helm/v3/cmd/helm/helm.go:66
runtime.main
        runtime/proc.go:250
runtime.goexit
        runtime/asm_amd64.s:1598

解决办法:

mv .config .config.20240319
helm version
Logo

腾讯云面向开发者汇聚海量精品云计算使用和开发经验,营造开放的云计算技术生态圈。

更多推荐