如何在AWS上通过kops安装的k8s集群中使用alb-ingress-controller?

时间:2017-12-12 11:49:18

标签: amazon-web-services load-balancing kops

想在AWS上使用alb-ingress-controller

已按kops安装k8s群集。

按照本指南使用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)

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

1 个答案:

答案 0 :(得分:0)

您是否已将标签添加到子网

在演练中说:

...

  1. 将标记添加到应在其中部署ALB的子网中。

...