我想为托管在 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
我错过了什么吗?