0

我想为托管在 GKE 中的 Web 应用启用 https。我有一个域名,arindam.fr 并且在 Cloud DNS 中提到了 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

我错过了什么吗?

4

2 回答 2

1

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

于 2019-06-11T08:37:19.653 回答
1

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

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

于 2019-06-06T01:56:01.513 回答