Nginx入口控制器无法从另一个工作空间访问入口

时间:2020-10-29 03:53:06

标签: kubernetes-ingress minikube nginx-reverse-proxy nginx-ingress

无法访问其他命名空间的入口,我的配置详细信息:

使用minikube addons enable ingress创建了入口控制器,kubectl get deploy -n kube-system返回:

NAME                       READY   UP-TO-DATE   AVAILABLE 
nginx-ingress-controller   1/1     1            1  

我在不同名称空间(假设cicd)中有服务列表和各自的入口, 所以kubectl get ingress -n cicd给了我

NAME                     HOSTS                        ADDRESS     PORTS   AGE
hello-ingress             hellohttp.ingress.host        10.1.2.3   80      9d

入口细节:

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  annotations:
    meta.helm.sh/release-name: hello-minikube
    meta.helm.sh/release-namespace: cicd
  creationTimestamp: "2020-1-1T01:23:34Z"
  generation: 1
  labels:
    app.kubernetes.io/managed-by: Helm
  name: hello-ingress
  namespace: cicd
  resourceVersion: "12345"
  selfLink: /apis/extensions/v1beta1/namespaces/cicd/ingresses/hello-ingress
  uid: 8d952612-11ee-11eb-a0ef-0800277ab13f
spec:
  rules:
  - host: hellohttp.ingress.host
    http:
      paths:
      - backend:
          serviceName: hellows
          servicePort: 80
status:
  loadBalancer:
    ingress:
    - ip: 10.1.2.3

我也配置了etc / host etc文件。请让我知道我要去哪里错了。

0 个答案:

没有答案