想在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
。为什么不通过呢?
答案 0 :(得分:0)
您是否已将标签添加到子网?
在演练中说:
...
...