我正在尝试在 EKS 上设置一个具有类似入口的子域
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: ingress-test
annotations:
nginx.ingress.kubernetes.io/rewrite-target: /
kubernetes.io/ingress.class: "alb"
alb.ingress.kubernetes.io/scheme: internet-facing
alb.ingress.kubernetes.io/target-type: ip
alb.ingress.kubernetes.io/group.name: staging-ingress-group
alb.ingress.kubernetes.io/certificate-arn: arn:aws:acm:us-east-1:123456:certificate/abcdge-XXXXX
alb.ingress.kubernetes.io/listen-ports: '[{"HTTP": 80}, {"HTTPS":443}]'
alb.ingress.kubernetes.io/ssl-redirect: '443'
alb.ingress.kubernetes.io/load-balancer-name: nginx-test-alb
spec:
rules:
- host: admin.test.com
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: nginx-test
port:
number: 80
并且服务设置为
apiVersion: v1
kind: Service
metadata:
labels:
app: nginx-test
name: nginx-test
spec:
ports:
- port: 80
protocol: TCP
targetPort: 80
selector:
app: nginx-test
type: ClusterIP
这是将 Route53 中的子域设置为
cname-admin.test.com TXT=> heritage=external-dns,external-dns/owner=ZXXXXX,external-dns/resource=service/staging/nginx-test
还没有创建负载均衡器。
当我转到https://admin.test.com时它不起作用,可能是什么原因?
您的集群中是否安装并配置了 AWS 负载均衡器控制器?