Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add getting started based on fargate #488

Merged
merged 4 commits into from Jun 30, 2021

Conversation

rothgar
Copy link
Contributor

@rothgar rothgar commented Jun 28, 2021

Description of changes:

This updates the AWS getting started guide to create an EKS cluster using fargate instead of a managed node group. It also simplifies some of the karpenter cloudformation by including a service account with the EKS config.

I ran through the setup a few times and this morning did it on a personal account to verify costs. For the cluster I provisioned this setup should be slightly cheaper. I'm waiting for my bill to give an exact estimate but based on what I tried it's $.0864 with fargate vs $.096 with m5.large instance.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

docs/aws/README.md Outdated Show resolved Hide resolved
@@ -103,17 +100,18 @@ kind: Provisioner
metadata:
name: default
spec:
ttlSeconds: 30
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added this just to show how people can configure it and for the cleanup section later to help people avoid costs.

docs/aws/README.md Outdated Show resolved Hide resolved
@rothgar
Copy link
Contributor Author

rothgar commented Jun 28, 2021

I'm not sure why but I think it's cool to see a bunch of fargate nodes and instances running workloads 😃

kubectl get no -L "node.kubernetes.io/instance-type"
NAME                                                    STATUS   ROLES    AGE     VERSION              INSTANCE-TYPE
fargate-ip-192-168-105-223.us-east-2.compute.internal   Ready    <none>   2d22h   v1.19.6-eks-e91815   
fargate-ip-192-168-114-48.us-east-2.compute.internal    Ready    <none>   2d23h   v1.19.6-eks-e91815   
fargate-ip-192-168-170-198.us-east-2.compute.internal   Ready    <none>   2d22h   v1.19.6-eks-e91815   
fargate-ip-192-168-98-14.us-east-2.compute.internal     Ready    <none>   2d23h   v1.19.6-eks-e91815   
ip-192-168-177-75.us-east-2.compute.internal            Ready    <none>   62s     v1.19.12             c5a.16xlarge

docs/aws/README.md Outdated Show resolved Hide resolved
--parameter-overrides ClusterName=${CLUSTER_NAME}

# Add the karpenter node role to your aws-auth configmap, allowing nodes with this role to connect to the cluster.
eksctl create iamidentitymapping \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent!

docs/aws/README.md Outdated Show resolved Hide resolved
--nodes-max 10 \
--managed \
--with-oidc
curl -fsSL https://raw.githubusercontent.com/awslabs/karpenter/"${LATEST_KARPENTER_VERSION}"/docs/aws/eks-config.yaml \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't this work

curl -fsSL https://raw.githubusercontent.com/awslabs/karpenter/$LATEST_KARPENTER_VERSION/docs/aws/eks-config.yaml

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Until this is merged you'll have to change the curl command to cat ./docs/aws/eks-config.yaml on this PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or you should be able to

curl -fsSL https://raw.githubusercontent.com/awslabs/karpenter/7afb5fdc65373e96efe08edcb52837673cd5c9b6/docs/aws/eks-config.yaml

docs/aws/README.md Outdated Show resolved Hide resolved
```

### Create a Cluster

Create an EKS cluster
Karpenter can run anywhere, including on self-managed node groups, [managed node groups](https://docs.aws.amazon.com/eks/latest/userguide/managed-node-groups.html), or [AWS Fargate](https://aws.amazon.com/fargate/).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need another line here, "including other cloud providers"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should that be in the AWS guide? I would assume when we get support for other providers we'll have different guides for those environments.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think @rothgar has the right idea here. I think this will become effectively a non-issue when #484 lands

docs/aws/README.md Outdated Show resolved Hide resolved
@@ -37,54 +38,47 @@ SUBNET_IDS=$(aws cloudformation describe-stacks \
--output text)

aws ec2 create-tags \
--resources $(echo $SUBNET_IDS | tr ',' '\n') \
--resources $(echo ${SUBNET_IDS//,/ }) \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

docs/aws/README.md Outdated Show resolved Hide resolved
docs/aws/README.md Outdated Show resolved Hide resolved
ClusterName:
Type: String
Description: "EKS cluster name"
Resources:
KarpenterControllerRole:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now users are forced to install karpenter using eksctl (to create this role). Thoughts on alternatives?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the example we're only showing eksctl (and how easy it is) We should absolutely document how to do this manually and what the requirements are (as well how to customize it). That all seemed like out of scope for the getting started guide.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SGTM

Copy link
Contributor

@ellistarn ellistarn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work!

@ellistarn ellistarn merged commit f446b4b into aws:main Jun 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants