-
Choerodon平台版本: 0.6.0
-
遇到问题的执行步骤: 验证部署
-
文档地址:
http://choerodon.io/zh/docs/installation-configuration/steps/dns/#自主搭建dns -
环境信息(如:节点信息):
[root@node1 ~]# kubectl get nodes
NAME STATUS ROLES AGE VERSION
node1 Ready master 6d v1.8.5 -
报错日志:
[root@node1 ~]# kubectl exec -n choerodon-devops-prod $(kubectl get po -n choerodon-devops-prod -l example.choerodon.io/infra=dnsmasq -o jsonpath="{.items[0].metadata.name}") host example.choerodon.io
error: error executing jsonpath “{.items[0].metadata.name}”: array index out of bounds: index 0, length 0
Error from server (NotFound): pods “Error” not found
独立抽取子语句执行后:
[root@node1 ~]# kubectl get po -n choerodon-devops-prod -l example.choerodon.io/infra=dnsmasq -o jsonpath="{.items[0].metadata.name}"
Error executing template: array index out of bounds: index 0, length 0. Printing more information for debugging the template:
template was:
{.items[0].metadata.name}
object given to jsonpath engine was:
map[string]interface {}{“kind”:“List”, “apiVersion”:“v1”, “metadata”:map[string]interface {}{“selfLink”:"", “resourceVersion”:""}, “items”:[]interface {}{}}
error: error executing jsonpath “{.items[0].metadata.name}”: array index out of bounds: index 0, length 0
- 疑问:
好像kube-dns.cm.yml里面的域名没有注册成功? 但是验证之前的全部语句都是执行成功的,没有报错。