我是kubernetes的新手,所以提前为任何愚蠢的问题和错误道歉。我正试图通过ArgoCD的入口设置外部访问。我的设置是一个aws周集群。我按照这里的指南设置了alb。我还设置了外部dns服务,如下所述。我也遵循了指南中的验证步骤,并且能够确认dns记录也被创建了,并且我能够访问foo服务。
对于argoCD,我通过 安装了manifestkubectl create namespace argocd
kubectl apply -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml -n argocd
argoCD文档提到了在这里添加一个分离http和grpc的服务和一个入口设置。我按照这个安装了这些
apiVersion: v1
kind: Service
metadata:
annotations:
alb.ingress.kubernetes.io/backend-protocol-version: HTTP2
external-dns.alpha.kubernetes.io/hostname: argocd.<mydomain.com>
labels:
app: argogrpc
name: argogrpc
namespace: argocd
spec:
ports:
- name: "443"
port: 443
protocol: TCP
targetPort: 8080
selector:
app.kubernetes.io/name: argocd-server
sessionAffinity: None
type: ClusterIP
apiVersion: networking.k8s.io/v1 # Use extensions/v1beta1 for Kubernetes 1.18 and older
kind: Ingress
metadata:
annotations:
kubernetes.io/ingress.class: alb
alb.ingress.kubernetes.io/scheme: internet-facing
alb.ingress.kubernetes.io/backend-protocol: HTTPS
alb.ingress.kubernetes.io/conditions.argogrpc: |
[{"field":"http-header","httpHeaderConfig":{"httpHeaderName": "Content-Type", "values":["application/grpc"]}}]
alb.ingress.kubernetes.io/listen-ports: '[{"HTTPS":443}]'
name: argocd
namespace: argocd
spec:
rules:
- host: argocd.<mydomain.com>
http:
paths:
- backend:
service:
name: argogrpc
port:
number: 443
pathType: ImplementationSpecific
- backend:
service:
name: argocd-server
port:
number: 443
pathType: ImplementationSpecific
tls:
- hosts:
- argocd.<mydomain.com>
定义成功应用,但我没有看到创建的dns记录,也没有列出任何外部IP。我是否遗漏了任何步骤,或者这里有任何配置错误?提前感谢!
服务类型需要为NodePort