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

[VC-35411] AWS + EKS + Route53 + Let's Encrypt tutorial #1544

Conversation

wallrj
Copy link
Member

@wallrj wallrj commented Sep 4, 2024

Preview: https://deploy-preview-1544--cert-manager.netlify.app/docs/tutorials/getting-started-aws-letsencrypt/

I've written this tutorial:

  1. Because I felt bad about having written getting started guides for Google and Azure but missing out AWS
  2. Because I've been trying to better understand how the Route53 ACME DNS01 code works, for:

The content is largely copied from the Azure AKS tutorial.

@cert-manager-prow cert-manager-prow bot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. dco-signoff: yes Indicates that all commits in the pull request have the valid DCO sign-off message. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Sep 4, 2024
Copy link

netlify bot commented Sep 4, 2024

Deploy Preview for cert-manager ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 43ed665
🔍 Latest deploy log https://app.netlify.com/sites/cert-manager/deploys/66dea2d6b4ce750008eeb17a
😎 Deploy Preview https://deploy-preview-1544--cert-manager.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@wallrj wallrj force-pushed the aws-eks-route53-letsencrypt-tutorial branch 5 times, most recently from 311ad4f to 41774e8 Compare September 4, 2024 14:57
@wallrj wallrj changed the title WIP: AWS tutorial WIP: [VC-35411] AWS + EKS + Route53 + Let's Encrypt tutorial Sep 4, 2024
@wallrj wallrj force-pushed the aws-eks-route53-letsencrypt-tutorial branch from 41774e8 to dccddf0 Compare September 4, 2024 16:48
@cert-manager-prow cert-manager-prow bot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Sep 4, 2024
@wallrj wallrj force-pushed the aws-eks-route53-letsencrypt-tutorial branch 5 times, most recently from 4691cec to 165a27a Compare September 4, 2024 21:08
@wallrj wallrj changed the title WIP: [VC-35411] AWS + EKS + Route53 + Let's Encrypt tutorial [VC-35411] AWS + EKS + Route53 + Let's Encrypt tutorial Sep 4, 2024
@wallrj wallrj marked this pull request as ready for review September 4, 2024 21:25
@cert-manager-prow cert-manager-prow bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Sep 4, 2024
Copy link
Member Author

Choose a reason for hiding this comment

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

> according to the Amazon's [EKS Best Practices Guide](https://aws.github.io/aws-eks-best-practices/).
> Consider using the [AWS Load Balancer Controller](https://docs.aws.amazon.com/eks/latest/userguide/aws-load-balancer-controller.html) instead.

The stable DNS host name of the load balancer can be used as an alias for the `www` record in your chosen `$DOMAIN_NAME`
Copy link
Contributor

Choose a reason for hiding this comment

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

While I think its overkill to cover it in detail in this guide, do we want to mention that automation solutions like ExternalDNS exist that can automate DNS for Kubernetes services/ingress/gateway?

Copy link
Member

@SgtCoDFish SgtCoDFish left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve
/hold

This is a great addition! I haven't run it myself because I don't have easy access to an AWS environment or the time to start, but it looks like how I'd expect.

I don't see any blockers really. I have a few suggestions so I've added a hold in case you want to add them and re-request a review!

Comment on lines 25 to 29
In the first part of this tutorial you will learn the basics required to deploy an HTTPS website on an Amazon Elastic Kubernetes Service (EKS) cluster, using cert-manager to create the SSL certificate for the web server.
You will create a DNS domain for your website, create an EKS cluster, install cert-manager, create an SSL certificate and then deploy a web server which responds to HTTPS requests from clients on the Internet.
But the SSL certificate in part 1 is only for testing purposes.

In part 2 you will learn how to configure cert-manager to use Let's Encrypt and Route53 DNS to create a trusted SSL certificate which you can use in production.
Copy link
Member

Choose a reason for hiding this comment

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

suggestion (non-blocking): The line "But the SSL certificate in part 1 is only for testing purposes." doesn't really flow with the rest of the text IMO. How about a minor tweak?

Suggested change
In the first part of this tutorial you will learn the basics required to deploy an HTTPS website on an Amazon Elastic Kubernetes Service (EKS) cluster, using cert-manager to create the SSL certificate for the web server.
You will create a DNS domain for your website, create an EKS cluster, install cert-manager, create an SSL certificate and then deploy a web server which responds to HTTPS requests from clients on the Internet.
But the SSL certificate in part 1 is only for testing purposes.
In part 2 you will learn how to configure cert-manager to use Let's Encrypt and Route53 DNS to create a trusted SSL certificate which you can use in production.
In the first part of this tutorial you will learn the basics required to deploy an HTTPS website on an Amazon Elastic Kubernetes Service (EKS) cluster, using cert-manager to create the SSL certificate for the web server.
You will create a DNS domain for your website, create an EKS cluster, install cert-manager, create an SSL certificate and then deploy a web server which responds to HTTPS requests from clients on the Internet.
The SSL certificate in part 1 is only for testing purposes; in part 2 you will learn how to configure cert-manager to use Let's Encrypt and Route53 DNS to create a trusted SSL certificate which you can use in production.

ELB_CANONICAL_HOSTED_ZONE_NAME=$(kubectl get svc helloweb --output=jsonpath='{ .status.loadBalancer.ingress[0].hostname }')
aws elb describe-load-balancers --query "LoadBalancerDescriptions[?CanonicalHostedZoneName == '$ELB_CANONICAL_HOSTED_ZONE_NAME'] | [0]" \
| jq '{
"Comment": "Creating a CNAME record",
Copy link
Member

Choose a reason for hiding this comment

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

suggestion: The reference to a CNAME in this comment might be a little jarring for newbies given the action references an A record and we're talking about alias records.

Suggested change
"Comment": "Creating a CNAME record",
"Comment": "Creating an alias record",

Comment on lines 355 to 354
> ⚠️ We used curl's `--insecure` option because it rejects self-signed certificates by default.
> Later you will learn how to create a trusted certificate signed by Let's Encrypt.
Copy link
Member

Choose a reason for hiding this comment

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

suggestion: This doesn't quite read right (it sounds like it's the insecure flag which rejects self signed certs).

Suggested change
> ⚠️ We used curl's `--insecure` option because it rejects self-signed certificates by default.
> Later you will learn how to create a trusted certificate signed by Let's Encrypt.
> ⚠️ We used curl's `--insecure` option because curl will reject the untrusted certificate we generated otherwise.
> Later you will learn how to create a trusted certificate signed by Let's Encrypt.

@cert-manager-prow cert-manager-prow bot added do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. lgtm Indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Sep 5, 2024
@wallrj wallrj force-pushed the aws-eks-route53-letsencrypt-tutorial branch from 165a27a to 5126c26 Compare September 9, 2024 07:22
@cert-manager-prow cert-manager-prow bot removed the lgtm Indicates that a PR is ready to be merged. label Sep 9, 2024
Signed-off-by: Richard Wall <[email protected]>
@wallrj wallrj force-pushed the aws-eks-route53-letsencrypt-tutorial branch from 5126c26 to 43ed665 Compare September 9, 2024 07:25
@wallrj
Copy link
Member Author

wallrj commented Sep 9, 2024

@SgtCoDFish I made those changes and added a link to ExternalDNS. PTAL.

Copy link
Member

@SgtCoDFish SgtCoDFish left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

@cert-manager-prow cert-manager-prow bot added the lgtm Indicates that a PR is ready to be merged. label Sep 9, 2024
@cert-manager-prow
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: SgtCoDFish

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@wallrj
Copy link
Member Author

wallrj commented Sep 9, 2024

/unhold

@cert-manager-prow cert-manager-prow bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Sep 9, 2024
@cert-manager-prow cert-manager-prow bot merged commit 4b0b6fc into cert-manager:master Sep 9, 2024
7 checks passed
@wallrj wallrj deleted the aws-eks-route53-letsencrypt-tutorial branch September 9, 2024 09:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. dco-signoff: yes Indicates that all commits in the pull request have the valid DCO sign-off message. lgtm Indicates that a PR is ready to be merged. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants