AWS EKS

This example demonstrates provisioning a Elastic Kubernetes Service (EKS) cluster on the AWS cloud. The deployment consists of:

In this example we will deploy only the cluster. Later, in the more advanced examples (multi cloud examples) we will leverage this setup as the basis for deploying a containerized service.

Prerequisites

This example expects the following prerequisites:

Cloudify CLI or Cloudify Management Console?

Cloudify allows for multiple user interfaces. Some users find the Cloudify Management Console (web based UI) more intuitive while others prefer the Cloudify CLI (Command Line Interface). This tutorial and all following ones will describe both methods.

Cloudify Management Console

This section explains how to run the above described steps using the Cloudify Management Console. The Cloudify Management Console and Cloudify CLI can be used interchangeably for all Cloudify activities.

Import Plugins, Blueprints and Secrets

To connect to AWS, credentials and Cloudify plugins are required. AWS credentials can be created by following the guide here. Cloudify recommends storing such sensitive information in a Cloudify secret. Secrets are kept encrypted in a secure way and used in run-time by the system. Learn more about Cloudify secrets here.

Cloudify version 6+ offers a fast-track process to import both credentials and all necessary plugins. As soon as the Cloudify Management Console loads, from the dashboard page, click on Setup Cloud Account. It will present several “Cloud Providers” options. Choose the AWS option and enter the requested credentials to automatically import the required secrets and plugins.

AWS getting started

AWS import access

AWS import summary

Validate Secrets

To view the imported secrets in the Cloudify Manager, login to the Cloudify Management Console and select the Resources page and navigate to the Secrets tab. The following secrets should exist after following the above steps:

Required secrets for this example

Validate Plugins

To view the imported plugins in the Cloudify Manager, login to the Cloudify Management Console and select the Resources page and navigate to the Plugins tab. The following plugins should exist after following the above steps:

Required plugins for this example

Deploy an AWS EKS Cluster

On the Blueprints page, click the Deploy button for the Kubernetes-AWS-EKS blueprint.

Click the Deploy & Install button at the bottom of the form to start the deployment. On the following page, click the Execute button.

AWS blueprints

You now have a Cloudify Deployment running the default install workflow. Cloudify will begin actively interfacing with AWS to deploy a AWS EKS Kubernetes cluster. You can track the status of the Deployment in the Execution Task Graph panel in the Deployments page.

AWS Kubernetes cluster complete


Using the AWS EKS Cluster

Install CLI tools

Kubectl

AWS documentation: https://docs.aws.amazon.com/eks/latest/userguide/install-kubectl.html

AWS CLI

AWS documentation: https://docs.aws.amazon.com/cli/latest/userguide/install-cliv1.html

For Linux users, we recommend the quick install method using Python3 and PIP.

python3 -m venv venv
source venv/bin/activate
pip3 install awscli

# Check the AWS CLI version
aws --version

# Configure the CLI (enter your access credentials here)
aws configure

# Confirm everything is working
aws sts get-caller-identity

# Create a Kubectl config
# replace "your_cluster_name" and "your_region" with the values you 
# used in your Deployment earlier. 
aws eks --region your_region update-kubeconfig --name your_cluster_name

Verify access

# List version
kubectl version --kubeconfig ~/.kube/config

# List namespaces
kubectl get ns --kubeconfig ~/.kube/config

# List nodes
kubectl get nodes --kubeconfig ~/.kube/config