Skip to content

Capstone Project for Udacity's Cloud DevOps nano-degree

Notifications You must be signed in to change notification settings

ramirezalfredo/capstone-project

Repository files navigation

capstone-project

Capstone Project for Udacity's Cloud DevOps nano-degree

For this project, I've decided to perform blue/green deployments by deploying a new node group instead of a new cluster, minimizing deployment times.

EKS CLuster Deployment

Most of the CloudFormation templates for Cluster deployment comes from:

I'm deploying the cluster outside of the Jenkins pipeline for saving some time on Control Plane deployment and also to have some components like Ingress Controller and External DNS available for application deployment in the pipeline.

To deploy the cluster:

  • Switch to the eks-cluster folder, run: ./create-stack.sh.
  • Once the stack has been deployed (check the console), run: ./get-credentials.sh.
  • Get the node group Role (not the instance profile), and add it to the aws-auth-cm.yaml manifest in order to authorize the self-managed node group to join the cluster.

Cluster Validation

$ kubectl get svc
$ kubectl get all -A

Enabling IAM roles for service accounts on your cluster

To create an IAM OIDC identity provider for your cluster with the AWS Management Console

  • Retrieve the OIDC issuer URL from the Amazon EKS console description of your cluster or use the following AWS CLI command.
    aws eks describe-cluster --name CapstoneEKS --query "cluster.identity.oidc.issuer" --output text
  • Open the IAM console at https://console.aws.amazon.com/iam/.
  • In the navigation pane, choose Identity Providers, and then choose Create Provider.
  • For Provider Type, choose Choose a provider type, and then choose OpenID Connect.
  • For Provider URL, paste the OIDC issuer URL for your cluster.
  • For Audience, type sts.amazonaws.com and choose Next Step.
  • Verify that the provider information is correct, and then choose Create to create your identity provider.

Update the Trust Relationship in AlbIngressControllerRole and ExternalDnsRole with the OIDC issuer value.

Deploy ALB Ingress Controller and external-dns

Both add-ons can be deployed by using the following script:

$ ./deploy-addons.sh

More information

For the ALB ingress controller setup, follow these instructions:

For external-dns, Policy document and Role has been deployed according to:

For both cases, IAM role assigment was done with the instructions in the following documents:

Alternate documents:

Create the Kubernetes namespaces

  • kubectl create ns production
  • kubectl create ns development

Deploy initial development environment

  • kubectl -n development apply -f kubernetes/deployment.yaml
  • kubectl -n development apply -f kubernetes/service.yaml

Testing the development environment

Misc

To add more parameters to the parameters.json file:

    {
        "ParameterKey": "",
        "ParameterValue": ""
    }

About

Capstone Project for Udacity's Cloud DevOps nano-degree

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published