Xin*_*Cai 1 kubernetes kubernetes-ingress argocd
我正在尝试在我的 Azure Kubernetes 服务 (AKS) 集群上添加 argocd 入口资源。我遵循本指南https://argoproj.github.io/argo-cd/operator-manual/ingress/#kubernetesingress-nginx
当我在 Kubernetes AKS 集群上应用入口资源时。它给出了以下错误消息。它正在 AKS kubernete 集群上运行v1.18.14
有人遇到过同样的问题吗?
集群环境:
Client Version: v1.20.0
Server Version: v1.19.6
Run Code Online (Sandbox Code Playgroud)
错误信息
error validating data: [ValidationError(Ingress.spec.rules[0].http.paths[0].backend): unknown field "serviceName" in io.k8s.api.networking.v1.IngressBackend, ValidationError(Ingress.spec.rules[0].http.paths[0].backend): unknown field "servicePort" in io.k8s.api.networking.v1.IngressBackend]; if you choose to ignore these errors, turn validation off with --validate=false
Run Code Online (Sandbox Code Playgroud)
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: argocd-server-http-ingress
namespace: argocd
annotations:
kubernetes.io/ingress.class: "nginx-internal"
nginx.ingress.kubernetes.io/force-ssl-redirect: "true"
nginx.ingress.kubernetes.io/backend-protocol: "HTTP"
spec:
rules:
- http:
paths:
- path: /argocd
pathType: ImplementationSpecific
backend:
serviceName: argocd-server
servicePort: http
host: argocd.example.com
tls:
- hosts:
- argocd.example.com
secretName: argocd-secret # do not change, this is provided by Argo CD
Run Code Online (Sandbox Code Playgroud)
请查找以下1.19 Kubernetes 版本的示例入口
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: minimal-ingress
annotations:
nginx.ingress.kubernetes.io/rewrite-target: /
spec:
rules:
- http:
paths:
- path: /testpath
pathType: Prefix
backend:
service:
name: test
port:
number: 80
Run Code Online (Sandbox Code Playgroud)
您可以在以下位置阅读更多信息: https: //kubernetes.io/docs/concepts/services-networking/ingress/#the-ingress-resource
如果您运行的是Kubernetes版本1.18
示例入口将类似于
apiVersion: "networking.k8s.io/v1beta1"
kind: "Ingress"
metadata:
name: "example-ingress"
spec:
ingressClassName: "external-lb"
rules:
- host: "*.example.com"
http:
paths:
- path: "/example"
pathType: "Prefix"
backend:
serviceName: "example-service"
servicePort: 80
Run Code Online (Sandbox Code Playgroud)
您可以在 Kubernetes 官方博客中阅读有关改进的更多信息:https://kubernetes.io/blog/2020/04/02/improvements-to-the-ingress-api-in-kubernetes-1.18/
| 归档时间: |
|
| 查看次数: |
6563 次 |
| 最近记录: |