问题原因分析 :
一: 当前 kubenetes 版本 与 执行的 yaml 内置版本有冲突。
解决方案
第一步: 将 apiVersion: ... 修改为: apps/v1
第二步:重新 执行 kubectl apply -f 命令即可
二: 如果 发现提示 already exists
Error from server (AlreadyExists): error when creating "grafana.yaml": deployments.apps "monitoring-grafana" already exists
解决方案
1. 执行 delete 命令 ,然后再 重新执行 kubectl apply -f 命令即可
kubectl delete -f grafana.yaml
kubectl apply -f grafana.yaml