AWS EKS 留言簿 url 无法访问

AWS EKS Guestbook url not accessible

我在 Win10 上使用 cygwin 和其他一些 choco 东西,一切都已安装并且 运行 没问题。我能够安装和 运行 来自 ecs-cli 和 fargate 教程的东西,也可以编写。

现在我正在尝试 EKS 并从此处的 ekstcl 入门设置集群和留言簿: https://docs.aws.amazon.com/eks/latest/userguide/getting-started-eksctl.html

然后这里集群搭建完成后: https://docs.aws.amazon.com/eks/latest/userguide/eks-guestbook.html

我创建了仅限 AWS Fargate 的集群。 我只是一步一步来,最后当我在浏览器中打开 url 时,它显示

This page isn’t working
a8b3bb2e121f511ea82cb1294ea943ee-1408939369.us-east-1.elb.amazonaws.com didn’t send any data.
ERR_EMPTY_RESPONSE

一步一步:

$ eksctl version
[ℹ]  version.Info{BuiltAt:"", GitCommit:"", GitTag:"0.11.1"}

$ eksctl create cluster --name eks-snafu --version 1.14 --region us-east-1 --fargate
[ℹ]  eksctl version 0.11.1
[ℹ]  using region us-east-1
[ℹ]  setting availability zones to [us-east-1f us-east-1b]
[ℹ]  subnets for us-east-1f - public:192.168.0.0/19 private:192.168.64.0/19
[ℹ]  subnets for us-east-1b - public:192.168.32.0/19 private:192.168.96.0/19
[ℹ]  using Kubernetes version 1.14
[ℹ]  creating EKS cluster "eks-snafu" in "us-east-1" region with Fargate profile
[ℹ]  if you encounter any issues, check CloudFormation console or try 'eksctl utils describe-stacks --region=us-east-1 --cluster=eks-snafu'
[ℹ]  CloudWatch logging will not be enabled for cluster "eks-snafu" in "us-east-1"
[ℹ]  you can enable it with 'eksctl utils update-cluster-logging --region=us-east-1 --cluster=eks-snafu'
[ℹ]  Kubernetes API endpoint access will use default of {publicAccess=true, privateAccess=false} for cluster "eks-snafu" in "us-east-1"
[ℹ]  1 task: { create cluster control plane "eks-snafu" }
[ℹ]  building cluster stack "eksctl-eks-snafu-cluster"
[ℹ]  deploying stack "eksctl-eks-snafu-cluster"
[✔]  all EKS cluster resources for "eks-snafu" have been created
[✔]  saved kubeconfig as "<MY WIN HOME>/.kube/config"
[ℹ]  creating Fargate profile "fp-default" on EKS cluster "eks-snafu"
[ℹ]  created Fargate profile "fp-default" on EKS cluster "eks-snafu"
[ℹ]  "coredns" is now schedulable onto Fargate
[ℹ]  "coredns" is now scheduled onto Fargate
[ℹ]  "coredns" pods are now scheduled onto Fargate
[ℹ]  kubectl command should work with "<MY WIN HOME>/.kube/config", try 'kubectl get nodes'
[✔]  EKS cluster "eks-snafu" in "us-east-1" region is ready

$ kubectl get svc -o wide
NAME         TYPE        CLUSTER-IP   EXTERNAL-IP   PORT(S)   AGE    SELECTOR
kubernetes   ClusterIP   10.100.0.1   <none>        443/TCP   7m7s   <none>

$ kubectl apply -f https://raw.githubusercontent.com/kubernetes/examples/master/guestbook-go/redis-master-controller.json
replicationcontroller/redis-master created

$ kubectl apply -f https://raw.githubusercontent.com/kubernetes/examples/master/guestbook-go/redis-master-service.json
service/redis-master created

$ kubectl apply -f https://raw.githubusercontent.com/kubernetes/examples/master/guestbook-go/redis-slave-controller.json
replicationcontroller/redis-slave created

$ kubectl apply -f https://raw.githubusercontent.com/kubernetes/examples/master/guestbook-go/redis-slave-service.json
service/redis-slave created

$ kubectl apply -f https://raw.githubusercontent.com/kubernetes/examples/master/guestbook-go/guestbook-controller.json
replicationcontroller/guestbook created

$ kubectl apply -f https://raw.githubusercontent.com/kubernetes/examples/master/guestbook-go/guestbook-service.json
service/guestbook created

$ kubectl get services -o wide
NAME           TYPE           CLUSTER-IP       EXTERNAL-IP                                                               PORT(S)          AGE   SELECTOR
guestbook      LoadBalancer   10.100.201.159   a8b3bb2e121f511ea82cb1294ea943ee-1408939369.us-east-1.elb.amazonaws.com   3000:32600/TCP   12s   app=guestbook
kubernetes     ClusterIP      10.100.0.1       <none>                                                                    443/TCP          14m   <none>
redis-master   ClusterIP      10.100.133.248   <none>                                                                    6379/TCP         43s   app=redis,role=master
redis-slave    ClusterIP      10.100.198.154   <none>                                                                    6379/TCP         26s   app=redis,role=slave

现在我打开这个: http://a8b3bb2e121f511ea82cb1294ea943ee-1408939369.us-east-1.elb.amazonaws.com:3000

一无所获:(

我做错了什么?

你没有做错任何事。但是,在 Fargate 上使用 EKS 时,您必须 consider certain things. This includes, as of time of writing, that only ALB is supported. The Guestbook example uses 服务类型 LoadBalancer,导致创建经典负载均衡器,即 ATM,在 Fargate 上的 EKS 中不受支持。

Michael Hausenblas 是正确的:留言簿示例不适用于 Fargate 集群。

要设置 Linux-Only 集群,您可以按照 link (https://docs.aws.amazon.com/eks/latest/userguide/getting-started-eksctl.html) 页面中的说明进行操作。当您到达 "Create your Amazon EKS cluster and worker nodes" 时,只需 select "Cluster with Linux-only workloads" 而不是“仅限 AWS Fargate 的集群”。为了方便起见,我复制了下面的命令。

eksctl 创建集群\

--产品名称\

--region 地区代码 \

--nodegroup-name standard-workers \

--节点类型t3.medium\

--节点 3 \

--nodes-min 1 \

--nodes-max 4 \

--ssh-access \

--ssh-public-key my-public-key.pub \

--托管

P.S。意识到这个问题已经几个月了,并被标记为已接受,但我遇到了同样的问题,并且认为其他初学者可能需要更明确的说明。

P.S.S.这作为评论可能更好,但我还没有足够的声誉来发表评论!