Skip to content

sola-scriptura-zz/aws-techsummit2018-kubernetes-workshop

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Welcome to Tech Summit Kubernetes Hands-on Lab

kubernetes hands-on at Techsummit 2018

Read first : Description of the overall hands-on lab structure and objectives

These days, container services are being considered in various sectors to be operated at the production level thanks to its fast and easy deployment. Having said that, enterprise customers are also participating in the adoption of container services when implementing a development environment, although it is still in limited use cases. However, it is commonly regarded that, to be used as a service in the production environment, container services cause operational difficulties due to high technical obstacles and operation burden.

Several reasons are being observed for such perception. First, the absence of a proper operation tool. There are too many orchestration and operation tools, but for enterprise-level services, it is still unclear what would be an easy and reliable tool for stable service. Second, an application structure that does not consider the container environment. Generally, legacy application structure is converted into docker images for deployment. Finally, monitoring and debugging are a pain. Due to the nature of container services, a single service is distributed to multiple instances; in the MSA structure where multiple services are related to each other, debugging and logging become more complex.

Concerns of enterprise customers are not limited to the operation of container services, but also include network and storage management, configuration management and services for multi-Region deployment, and security. There is a high demand for a one-step guideline or hands-on material that cover all technical matters.

Hands-on Lab has contained Three phases and Pre Lab. Pre Lab explain full context of Hands-on lab with advance preparation as like the content of this article you are already reading.

Prelab - Build basic environment for operation

This section walks you through the creating a Kubernetes development environment using AWS Cloud9. This will provide you with a cloud-based integrated development environment (IDE) that will let you write, run, and debug containerized workloads using just a web browser.

Create AWS Cloud9 Environment

AWS Cloud9 Console

We can create the Cloud9 development environment via CloudFormation. This CloudFormation template will spin up the Cloud9 IDE, as well as configure the IDE environment for the rest of the workshop.

The CloudFormation template can create a new VPC, or you can choose an existing VPC if needed. If you are unsure, we recommend the "Launch template with an existing VPC" option.

Click on the "Deploy to AWS" button and follow the CloudFormation prompts to begin.

Note
AWS Cloud9 is currently available in 5 regions, and EKS is currently available in 2 regions (us-east-1 and us-west-2). Please choose the region closest to you. If you choose a region for Cloud9 that does not support EKS, you need to create VPC resources and change environment variables. This configuration has not been tested.

Region

Launch template with a new VPC

Launch template with an existing VPC

N. Virginia (us-east-1)

deploy to aws

deploy to aws

Oregon (us-west-2)

deploy to aws

deploy to aws

Accept the default stack name and Click Next. You can give Tags such as Key=Name, Value=k8s-workshop, and click Next. Make sure to check I acknowledge that AWS CloudFormation might create IAM resources with custom names and click Create.

CloudFormation creates nested stacks and builds several resources that are required for this workshop. Wait until all the resources are created. Once the status for k8s-workshop changes to CREATE_COMPLETE, you can open Cloud9 IDE. To open the Cloud9 IDE environment, click on the "Outputs" tab in CloudFormation Console and click on the "Cloud9IDE" URL.

CloudFormation Output Tab

You should see an environment similar to this:

cloud9 development environment welcome

Cloud9 Instance Role

The Cloud9 IDE needs to use the assigned IAM Instance profile. Open the "AWS Cloud9" menu, go to "Preferences", go to "AWS Settings", and disable "AWS managed temporary credentials" as depicted in the diagram here:

cloud9 disable temp credentials

Build Script

Once your Cloud9 is ready, download the build script and install in your IDE. This will prepare your IDE for running tutorials in this workshop. The build script installs the following:

  • jq

  • kubectl (the Kubernetes CLI, which we’ll cover in great detail later in the workshop)

  • heptio/authenticator (for authentication to the EKS cluster)

  • updates/configures the AWS CLI and stores necessary environment variables in bash_profile

  • kops (Kubernetes Operations, which we’ll also cover in detail later)

  • creates an SSH key

  • clone the workshop repository into Cloud9

To install the script, run this command in the "bash" terminal tab of the Cloud9 IDE:

wget https://raw.githubusercontent.com/cristov/aws-techsummit2018-kubernetes-workshop/master/scripts/lab-ide-setup.sh
chmod +x lab-ide-setup.sh && \
. ./lab-ide-setup.sh

Running the script in Cloud9 Terminal

At this point you can restart the Cloud9 IDE terminal session to ensure that the kubectl completion is enabled. Once a new terminal window is opened, type kubectl ver and press Tab to autocomplete and press Enter. This will ensure that the kubectl tool is installed on the command line correctly and can autocomplete.

Note
All shell commands (starting with "$") throughout the rest of the workshop should be run in this tab. You may want to resize it upwards to make it larger.

You are now ready to continue on with the workshop! Go for Pre-Lab to ensure the container fundermantal technical stack.

Let’s start Prelab go Next

About

Kubernetes workshop for AWS Tech Summit APAC 2018

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •