Challenge Overview

This is the HARD 1000 Points Competition

In the previous challenges, we built a new microservice for an existing application, containerized the application using docker and docker compose, and deployed it on the cloud.

In this challenge, we will:

1) Set up a Kubernetes cluster on cloud that hosts the containers built in the medium challenge

2) The logs of the applications should be stored on a persistent path on the host machine

3) There should be two clusters of the application containers running along with a load balancer (can be Kubernetes specific or third-party cloud load balancer) for a High Availability Topology

4) Use Helm Charts to deploy ELK stack for logs monitoring

Solving this problem you learn:

  • How Kubernetes helps make applications highly available.
  • How Kubernetes helps make applications scalable.

Learning Material:

https://www.magalix.com/blog/nodejs-app-sample-from-docker-to-kubernetes-cluster

https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/ha-topology/

Deploying ELK stack with Helm Charts

What do you need to do?

In this challenge, you need to set up a kubernetes cluster for the containerized microservices that we built in the Medium challenge.

Kubernetes Setup

1) Download and install kubernetes on your cloud instance where the application is deployed
2) Start the Kubernetes cluster using **minikube **(we are using minikube so that the master and worker process are on the same host for simplification of this challenge)

Kubernetes Cluster Configuration

Once you have the kubernetes and minikube installed, you are required to create a deploy.yml file on the root of the application folder that will contain the cluster definition:

1) Describe which API version you’re using to create this object i.e., deployment - you use any for e.g apps/v1

2) What kind of object you’re creating. In our case, it’s Deployment.

3) The name of our Deployment will be microservices-deployment

4) Define replicas to be at least 2 in the Spec object.

5) How many pods you want to deploy in the cluster under this Deployment. In our case, we want to deploy two pods running containers from our images.

6) Make sure the labels the pods are present

7) Define the containers specs of our microservices

a) Name of the container

b) The image that can be used by the container (you can provide the Dockerfile, or load the container images from local docker daemon)

c) Which port options to use for each microservice container should be defined for proper communication

Kubernetes Cluster Deployment

1) Once you have created the deploy.yml file, please go ahead and deploy the cluster using kubectl

2) Make sure the application is accessible over the internet (you can use MetalLB if your cloud provider does not provide you with a public ip/domain)

Deploying the ELK Stack on Kubernetes with Helm

1) Install and set up Helm Charts for Kubernetes

2) Use the Helm Charts to pull and deploy ELK (Elasticsearch, Logstash, and Kibana) stack for your kubernetes cluster.

Submission Deliverables

You must follow this submission folder structure so our automated test process can process your scoring:

  • Create a folder with “code” as the folder name then zip.
  • All the microservices that reside in their own folders should be placed inside this “code” folder. Please remove the _node_modules _folder from each microservices folder before submission.
  • Please make sure that the deploy.yml file is present at the root of the “code” folder
  • Please make sure that the Dockerfile is present in every microservice folder
  • Please make sure that the docker-compose.yml is present at the root of the “code” folder.
  • Please create a url.txt file inside the “code” folder and place your application’s url in that file.
  • Zip the “code” folder and submit to the challenge.

Topcoder Skill Builder Competition | Cloud Native | Problems

Host Challenge: https://www.topcoder.com/challenges/c1baa6a2-272f-4ae8-8c1f-2f53831deb2d

Easy: 250 Points. Challenge Link: https://www.topcoder.com/challenges/c4a13de5-3564-4a7e-817d-a1c07954ef84

Medium: 500 Points. Challenge Link: https://www.topcoder.com/challenges/51aaeea8-186b-403d-a7fe-ab39e4968fdd

Hard: 1000 Points. Challenge Link: https://www.topcoder.com/challenges/1fa67d57-e2f9-4e0f-ba13-7a0ffc453946

ELIGIBLE EVENTS:

2021 Topcoder(R) Open

Review style

Final Review

Community Review Board

Approval

User Sign-Off

ID: 30189806