hands-on lab

Create Kubernetes Nginx Ingress Controller for External API Traffic

Difficulty: Intermediate
Duration: Up to 1 hour and 30 minutes
Students: 730
Rating: 4.2/5
Get guided in a real environmentPractice with a step-by-step scenario in a real, provisioned environment.
Learn and validateUse validations to check your solutions every step of the way.
See resultsTrack your knowledge and monitor your progress.

Description

If you're building and deploying cloud-native applications and microservices, then Kubernetes is the must-have platform. Kubernetes provides superior container-orchestration, deployment, scaling, and management. When it comes to securing application traffic within Kubernetes, consider using Network Policies.

Being able to consume Kubernetes hosted services externally is a common requirement. Kubernetes provides the Ingress resource type to implement this requirement. In this lab, you learn how to deploy an Nginx Ingress Controller and install and expose a sample API service using an Ingress resource.

Lab Objectives

Upon completion of this lab, you will be able to:

You should:

  • Be comfortable with basic Linux command line administration
  • Be comfortable with basic Kubernetes cluster administration

Lab Environment

This lab will start with the following AWS resources provisioned automatically for you:

  • A single EC2 instance, named k8s.cluster.cloudacademy.platform.instance, which will have a public IP address attached. This will be the instance that you will connect to using your local workstation browser.

To achieve the lab end state, you will be walked through the process of:

  • Using your local workstation browser to remotely connect to k8s.cluster.cloudacademy.platform.instance
  • Install and setup the Nginx Ingress Controller
  • Deploy a ready made Programming Languages themed API into a Kubernetes cluster
  • Create and deploy an Ingress resource to expose the API externally
  • Test and validate the API externally

 

Updates

October 28th, 2024 - Resolved an issue preventing the lab from provisioning successfully

June 14th, 2024 - Resolved deployment issue

October 30th, 2023 - Updated the instructions and screenshots to reflect the latest UI

October 3rd, 2023 - Resolved ifconfig command issues

August 20th, 2020 - Fixed issue with the CNI plugin

August 19th, 2020 - Fixed issue with the storage provisioner

August 14th, 2020 - Fixed issue preventing Kubernetes environment from starting

Covered topics

Lab steps

Logging In to the Amazon Web Services Console
Connecting to the CloudAcademy Web based K8s IDE
Install Cilium CNI
Install Nginx Ingress Controller
Deploy the API Deployment and Service Resources
Deploy the API Ingress Resource
Perform External API Test