【问题标题】:nginx-ingress - https configuration - server IP address could not be foundnginx-ingress - https 配置 - 找不到服务器 IP 地址
【发布时间】:2019-06-01 12:42:44
【问题描述】:

我想为托管在 GKE 中的网络应用启用 https。我有一个域名,arindam.fr 和 DNS 名称在 Cloud DNS 中被提及,并获得了 A 类的 NS。

我收到错误:

无法访问此站点 arindam.fr 的服务器 IP 地址找不到。

访问页面时:https://arindam.fr/

https://github.com/arindam-b/DNSissue/blob/master/3.png

https://github.com/arindam-b/DNSissue/blob/master/1.PNG“云DNS”

我的部署和服务 yaml:

我的入口 yaml:

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: nginx-ingress
  namespace: default
  annotations:
    kubernetes.io/tls-acme: "true"
    kubernetes.io/ingress.class: "nginx"
spec:
  tls:
  - hosts:
    - arindam.fr
    secretName: tls-staging-cert
  rules:
  - host: arindam.fr
    http:
      paths:
      - path: /
        backend:
          serviceName: hello-app
          servicePort: 8080

在此之前,我使用 helm 安装了 nginx 控制器和证书管理器:

helm install --name nginx-ingress stable/nginx-ingress

我的域名注册中提到了域名的 NS,在 namecheap.com 中

https://github.com/arindam-b/DNSissue/blob/master/2.PNG“NS 配置”

apiVersion: apps/v1beta1
kind: Deployment
metadata:
  name: hello-app
spec:
  replicas: 1
  template:
    metadata:
      labels:
        app: hello-app        
        track: stable
    spec:
      containers:
        - name: hello-app
          image: "eu.gcr.io/rcup-mza-dev/hello-app:latest"
          ports:
          - containerPort: 8080
          livenessProbe:
                httpGet:
                    path: /
                    port: 8080
                initialDelaySeconds: 15
                timeoutSeconds: 30 
          readinessProbe:
                httpGet:
                    path: /
                    port: 8080
                initialDelaySeconds: 15
                timeoutSeconds: 30
---                
apiVersion: v1
kind: Service
metadata:
  name: hello-app
spec:
  type: ClusterIP       
  ports:
    - port: 80
      targetPort: 8080
  selector:
    app: hello-app    
    #  type: LoadBalancer

我错过了什么吗?

【问题讨论】:

    标签: lets-encrypt nginx-ingress google-cloud-dns cert-manager


    【解决方案1】:

    您注册的配置似乎没有正确传播谷歌的名称服务器,我只是在下面的link 中检查它。我还找到了这个guide,了解如何在 namecheap 中更改 NS,请记住,您需要选择“自定义 DNS”选项来指定 Google 的 NS。

    在您的注册商正确传播域名服务器后,这可能需要 24-72 小时,您将能够访问您的域。

    【讨论】:

    • 谢谢。我做出改变,等待它传播。
    【解决方案2】:

    DNSSEC 已关闭,因此无法正确传播。开机后就可以正常使用了。

    【讨论】:

      猜你喜欢
      • 2017-06-20
      • 1970-01-01
      • 2019-04-13
      • 1970-01-01
      • 1970-01-01
      • 2019-05-30
      • 2021-10-26
      • 2012-02-01
      • 2021-03-25
      相关资源
      最近更新 更多