4
votes

I'm on Win10 using cygwin and some other choco stuff, everything is installed and runs fine. I was able to install and run stuff from ecs-cli and fargate tutorial and compose too.

Now I'm trying EKS and set up cluster and guest book from the Getting Started with ekstcl here: https://docs.aws.amazon.com/eks/latest/userguide/getting-started-eksctl.html

And then after cluster is set up here: https://docs.aws.amazon.com/eks/latest/userguide/eks-guestbook.html

I created AWS Fargate-only Cluster. I'm just following step by step by and in the end when I'm opening the url in the browser it says

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

Step by step:

$ 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

Now I'm opening this: http://a8b3bb2e121f511ea82cb1294ea943ee-1408939369.us-east-1.elb.amazonaws.com:3000

And get nothing :(

What am I doing wrong?

2

2 Answers

4
votes

You're not doing anything wrong. However, when using EKS on Fargate you have to consider certain things. This includes, as of time of writing, that only ALB is supported. The Guestbook example uses a service type LoadBalancer, causing the creation of a classic load balancer, which is, ATM, not supported in EKS on Fargate.

1
votes

Michael Hausenblas is correct: the guestbook example doesn't work with a fargate cluster.

To set up a Linux-Only cluster, you can follow the instructions from the page you link (https://docs.aws.amazon.com/eks/latest/userguide/getting-started-eksctl.html). Just select "Cluster with Linux-only workloads" instead of " AWS Fargate-only cluster" when you get to "Create your Amazon EKS cluster and worker nodes". I copied the command below for convenience.

eksctl create cluster \

--name prod \

--region region-code \

--nodegroup-name standard-workers \

--node-type t3.medium \

--nodes 3 \

--nodes-min 1 \

--nodes-max 4 \

--ssh-access \

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

--managed

P.S. Realize this question is a few months old, and marked as accepted, but I had the same issue and figured other beginners might want more explicit instructions.

P.S.S. This might be better as a comment, but I don't have enough reputation to comment yet!