2

alb-ingress-controller在 AWS 上使用。

已经安装了 k8s 集群kops

按照本指南使用alb-ingress-controller

https://github.com/coreos/alb-ingress-controller/blob/master/docs/walkthrough.md

运行后检查日志时$ kubectl apply -f echoserver-ingress.yaml

$ kubectl logs -n kube-system \
$(kubectl get po -n kube-system | \
egrep -o alb-ingress[a-zA-Z0-9-]+) | \
egrep -o '\[ALB-INGRESS.*$' | \
grep 'echoserver\/echoserver'

[ALB-INGRESS] [echoserver/echoserver] [ERROR]: Error parsing annotations: Retrieval of subnets failed to resolve 2 qualified subnets. Subnets must contain the tag:kubernetes.io/cluster/cluster01.orange-test.dev.drecom.jp tag with a value of shared and the tag:kubernetes.io/role/alb-ingress tag signifying it should be used for ALBs Additionally, their must be at least 2 subnets with unique availability zones as required by ALBs. Either tag subnets to meet this requirement or use the subnets annotation on the ingress resource to explicitly call out what subnets to use for ALB creation. The subnets that did resolve were []. (cache hit)

我在每个唯一可用区为一个特殊 VPC 设置了两个子网。并将集群名称的值设置为shared,添加一个kubernetes.io/role/alb-ingress. 为什么不能通过?

4

1 回答 1

0

您是否在子网中添加了标签?

在演练中它说:

...

  1. 将标签添加到应部署 ALB 的子网。

...

于 2018-08-14T20:05:17.643 回答