无法在本地 kubernetes 集群中部署入口
unable to deploy ingress in local kubernetes cluster
我正在尝试使用本地 kubernetes 集群中的入口控制器为我的两个 Web 应用程序设置前端。我遵循了 [1] 中概述的所有步骤和 [2] 中的详细说明。但到目前为止运气不好。我得到的错误如下:
Warning CreatingLoadBalancerFailed Error creating load balancer (will retry): failed to ensure load balancer for service default/frontend: error creating loadbalancer a58617b3f260011e8ad84fa163e0c90a: error creating loadbalancer {a58617b3f260011e8ad84fa163e0c90a
Kubernetes external service a58617b3f260011e8ad84fa163e0c90a 7b4db6f7-3fc1-4c07-a84d-5c15b46e3ac2 <nil> }: Expected HTTP response code [201 202] when accessing [POST https://host.xyz.com:9696/v2.0/lbaas/loadbalancers],
but got 409 instead
{"NeutronError": {"message": "Quota exceeded for resources: ['loadbalancer'].", "type": "OverQuota", "detail": ""}}
我的服务处于待定状态。
到目前为止,我还不知道从哪里可以看出问题所在,希望得到任何建议。
manifest yaml文件与[2]几乎相同,它只列出了https接口。但这里是为了完整性
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: frontend
annotations:
ingress.kub.webernetes.io/rewrite-target: /
spec:
tls:
- secretName: ing-secret
replicas: 1
template:
metadata:
labels:
k8s-app: nginx-ingress-lb
containers:
- args:
- /nginx-ingress-controller
- "--default-backend-service=$(POD_NAMESPACE)/default-http-backend"
- "--default-ssl-certificate=$(POD_NAMESPACE)/ing-secret"
env:
- name: POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: POD_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
image: "gcr.io/google_containers/nginx-ingress-controller:0.9.0-beta.5"
rules:
- host: host.xxx.com
https:
paths:
- path: /app1
backend:
serviceName: app1
servicePort: 8881
- path: /app2
backend:
serviceName: app2
servicePort: 8882
---
apiVersion: v1
kind: Service
metadata:
name: frontend
spec:
type: LoadBalancer
ports:
- name: https
port: 443
targetPort: https
selector:
k8s-app: nginx-ingress-lb
[1] https://kubernetes.io/docs/concepts/services-networking/ingress/
[2]https://hackernoon.com/setting-up-nginx-ingress-on-kubernetes-2b733d8d2f45
您的服务正在尝试在 AWS 中创建一个新的负载均衡器,并且超出了您所在地区的配额。我假设你有 20,因为这是默认值:
https://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html#limits_elastic_load_balancer
以下是有关如何请求提高限额的说明:
https://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html
看起来 OpenStack lbaas 正被 kubernetes 用来提供入口资源下的负载均衡器服务(参见错误日志中的 https://host.xyz.com:9696/v2.0/lbaas/loadbalancers
)
据我所知,此错误表明已达到配置的负载平衡器数量的资源限制。我会向您的集群管理员提出问题。
我正在尝试使用本地 kubernetes 集群中的入口控制器为我的两个 Web 应用程序设置前端。我遵循了 [1] 中概述的所有步骤和 [2] 中的详细说明。但到目前为止运气不好。我得到的错误如下:
Warning CreatingLoadBalancerFailed Error creating load balancer (will retry): failed to ensure load balancer for service default/frontend: error creating loadbalancer a58617b3f260011e8ad84fa163e0c90a: error creating loadbalancer {a58617b3f260011e8ad84fa163e0c90a
Kubernetes external service a58617b3f260011e8ad84fa163e0c90a 7b4db6f7-3fc1-4c07-a84d-5c15b46e3ac2 <nil> }: Expected HTTP response code [201 202] when accessing [POST https://host.xyz.com:9696/v2.0/lbaas/loadbalancers],
but got 409 instead
{"NeutronError": {"message": "Quota exceeded for resources: ['loadbalancer'].", "type": "OverQuota", "detail": ""}}
我的服务处于待定状态。
到目前为止,我还不知道从哪里可以看出问题所在,希望得到任何建议。
manifest yaml文件与[2]几乎相同,它只列出了https接口。但这里是为了完整性
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: frontend
annotations:
ingress.kub.webernetes.io/rewrite-target: /
spec:
tls:
- secretName: ing-secret
replicas: 1
template:
metadata:
labels:
k8s-app: nginx-ingress-lb
containers:
- args:
- /nginx-ingress-controller
- "--default-backend-service=$(POD_NAMESPACE)/default-http-backend"
- "--default-ssl-certificate=$(POD_NAMESPACE)/ing-secret"
env:
- name: POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: POD_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
image: "gcr.io/google_containers/nginx-ingress-controller:0.9.0-beta.5"
rules:
- host: host.xxx.com
https:
paths:
- path: /app1
backend:
serviceName: app1
servicePort: 8881
- path: /app2
backend:
serviceName: app2
servicePort: 8882
---
apiVersion: v1
kind: Service
metadata:
name: frontend
spec:
type: LoadBalancer
ports:
- name: https
port: 443
targetPort: https
selector:
k8s-app: nginx-ingress-lb
[1] https://kubernetes.io/docs/concepts/services-networking/ingress/
[2]https://hackernoon.com/setting-up-nginx-ingress-on-kubernetes-2b733d8d2f45
您的服务正在尝试在 AWS 中创建一个新的负载均衡器,并且超出了您所在地区的配额。我假设你有 20,因为这是默认值: https://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html#limits_elastic_load_balancer
以下是有关如何请求提高限额的说明: https://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html
看起来 OpenStack lbaas 正被 kubernetes 用来提供入口资源下的负载均衡器服务(参见错误日志中的 https://host.xyz.com:9696/v2.0/lbaas/loadbalancers
)
据我所知,此错误表明已达到配置的负载平衡器数量的资源限制。我会向您的集群管理员提出问题。