[英]No ingress address on minikube Kubernetes cluster with nginx ingress controller
I've got the following: 我有以下几点:
ingress.yaml ingress.yaml
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: abcxyz
annotations:
kubernetes.io/ingress.class: nginx
spec:
rules:
- host: abcxyz
http:
paths:
- path: /a/
backend:
serviceName: service-a
servicePort: 80
- path: /b/
backend:
serviceName: service-b
servicePort: 80
Output of kubectl describe ingress abcxyz
: kubectl describe ingress abcxyz
输出kubectl describe ingress abcxyz
:
Name: abcxyz
Namespace: default
Address:
Default backend: default-http-backend:80 (<none>)
Rules:
Host Path Backends
---- ---- --------
abcxyz
/a/ service-a:80 (<none>)
/b/ service-b:80 (<none>)
Annotations:
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal CREATE 16m nginx-ingress-controller Ingress default/abcxyz
Normal UPDATE 12m (x2 over 15m) nginx-ingress-controller Ingress default/abcxyz
Why is the address empty? 为什么地址为空? I've installed the 'nginx ingress controller' through helm using
helm install stable/nginx-ingress
- and all of it's pods relevent seem to be running fine. 我已经使用
helm install stable/nginx-ingress
通过helm安装了“ nginx入口控制器”,并且所有的Pod关联似乎运行良好。
How can I provide access to the ingress? 如何提供对入口的访问权限?
Type 类型
minikube ip
to retrieve the master IP. 检索主IP。 for example:
例如:
bash-3.2$ minikube ip
192.168.1.100
The command that provides information about the kubernetes cluster is: 提供有关kubernetes集群的信息的命令是:
bash-3.2$ kubectl cluster-info
Kubernetes master is running at https://192.168.1.100:8443
KubeDNS is running at https://192.168.1.100:8443/api/v1/namespaces/kube-system/services/kube-dns:dns/proxy
To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'.
You can test the ingress controller from the host machine using curl
: 您可以使用
curl
从主机测试入口控制器:
bash-3.2$ curl http://192.168.1.100:80
default backend - 404
Finally, add a host entry to be able to use a name to refer to the cluster IP address 最后,添加一个主机条目,以便能够使用名称来引用集群IP地址。
In /etc/hosts
add: 在
/etc/hosts
添加:
192.168.1.100 abcxyz
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.