My experience at Microsoft Containers OpenHack featuring Kubernetes challenges

5 minute read

Azure consultants are constantly looking to expand our scope of expertise and aligning to this I’ve recently attended a Microsoft Containers OpenHack in Sydney. This event was a huge success for me and a rapid introduction to Kubernetes (K8s) and Azure Kubernetes Service (AKS) through a series of challenges over 3 days.

OpenHackLogo

Microsoft OpenHack is a developer-focused engagement where a wide variety of participants (Open) learn through hands-on experimentation (Hack) using challenges based on real-world customer scenarios designed to mimic the developer journey - Source: Microsoft

My experience at OpenHack

About 80 attendees were split up between the 20 tables in the room. My team had 2 international attendees and 3 locals (myself included). Everyone was joining the OpenHack with varying levels of real experience with K8s/AKS so things were destined to be kept interesting. The underlying theme of OpenHack is that there’s no clear path forward through the challenges and the ‘unknown’ factor is ever present.

The-Super-Awesome-Hacker-Team

  • Chan - Singapore
  • Yong - Korea
  • Chris - Australia
  • Yegor - Australia
  • Jesse (me) - Australia

As part of the fun (and because we were given seperate AAD logins to the Azure Subscription) our team took on aliases such as hacker1, hacker2, hackerX. During most of the challenges it felt as if we really did hack together a solution just to pass the success criteria.

And by hack I’m referring to the process of:

  • Searching through KB articles for code samples or architecture guidance
  • Creating new .YAML config files to apply changes to K8s/AKS
  • Testing code samples in Kubectl and AzureCLI via VSCode
  • Troubleshooting abstract errors and/or connectivity/security issues
  • More searching through KB articles
  • More testing of code
  • Finally getting something to work and meeting the success criteria

Elements of our application running in K8s/AKS would sometimes break during our changes and we’d have fun fixing it. That was a huge learning opportunity through break/fix and not something you’d experience very often under normal circumstances.

After making changes to our K8s/AKS environment as per the Challenge requirements, our instructor would have us demonstrate/prove each success criteria. For example: Demonstrate that you are prompted on cluster access to authenticate with AAD. There were some tense moments here as we waited for something, anything to break.

Due to limited time of the OpenHack (3 days) the focus was on completing challenges quickly by meeting the success criteria. This often led us to implement any available solution because there wasn’t sufficient time to compare options with a best vs sub-optimal decision. In this case I was happy to put aside consulting habits to keep things ticking along.

EscapeRoom

Personally I believe the structure of OpenHack works because, similar to an Escape Room, it seemed as if Microsoft had locked you into the room and to get out you needed to build a working Kubernetes environment on Azure. Hackathons, where teams have limited time and resources to design and present their submission, are also a similiar concept to how an OpenHack operates.

Challenges and Key Concepts

The Containers OpenHack consisted of 8 challenges to complete over 3 days. Unfortunately our Super-Awesome-Hacker-Team ran out of time to do them all, but it was a great learning experience anyways.

I’ve tried to compress each challenge to a single paragraph below and include links to the key concepts.

Challenge 1 / Day 1

We used Docker to build, tag, and push images to Azure Container Registry (ACR) based on the application source code. Docker was also used to pull, run, and configure a SQL Server container in Azure.

Challenge 2 / Day 1

We created an Azure Kubernetes Service (AKS) cluster and configured environment variables for the application’s microservices to connect to eachother, then deployed the application into the AKS cluster.

Challenge 3 / Day 2

We configured a dedicated VNET/Subnet for the AKS cluster and setup Azure Container Networking Interface (CNI). We also setup AAD integration for cluster authentication.

Challenge 4 / Day 2

We configured Kubernetes Namespaces and RBAC bindings to assign access to different application teams. We used Key Vault FlexVolume and Azure KeyVault to secure our environment secrets. We also created Kubernetes Ingress Controllers for inbound Layer 7 traffic forwarding to our services.

Challenge 5 / Day 3

We setup monitoring, logging, and alerts for the AKS cluster using Azure Monitor Insights, implemented Resource Limits via YAML on a newly deployed application (which was resource-hungry), and tested the Kubernetes Dashboard.

Challenge 6 / Day 3

We looked into enhancing cluster security by applying restrictions to traffic and application access. Ultimately the team decided not to pursue this challenge due to time constraints.

Challenge 7 / Day 3

We deployed an AKS Windows cluster and Windows Nodepools. We also configured Taints on the Nodepools and Tolerations on Pods to allow deployment of Linux and Windows containers to the same AKS cluster.

Challenge 8 / Day 3

We looked into deploying a service mesh into the AKS cluster using either Linkerd or Istio. The service mesh would have provided capabilities like traffic management and resiliency to our workloads and decoupled these capabilities from the application layer to the infrastructure layer. Ultimately we ran out of time here and were not able to get it working.

Closing Remarks

ChallengeComplete

My first Microsoft OpenHack was a great experience. I went in with low expectations and came away with more hands-on experience with Kubernetes and Azure Kubernetes Service than I would’ve hoped to achieve in 3 days.

You can check out if there’s an event coming near you - https://openhack.microsoft.com/

Cheers, Jesse

Leave a comment