尝试获取服务loadBalancer url
kubectl get svc --namespace default wordpress-1722945271 --template "{{ range (index .status.loadBalancer.ingress 0) }}{{ . }}{{ end }}"
出现错误
template: output:1:10: executing "output" at <index .status.loadBalancer.ingress>: error calling index: index of untyped nil
感谢 david-maze ,这里的解决方案是使用 minikube 隧道,因为它默认不支持 LoadBalancer https://minikube.sigs.k8s.io/docs/handbook/accessing/.