“Hands On Kubernetes” – first thoughts

So these are my first thoughts on the Hands on Kubernetes book by Nills Franssens et al…

It’s a solid book! I enjoyed especially the first chapter where it’s setting the stage for the demos / hands on work in the following chapters. Obviously there’s been some new additions in what capabilities Azure Kubernetes Service (AKS) has to offer since, which I’ll try to explain.

In chapter 2, the book asks you to create a new AKS cluster using the Azure Portal. THis could be done with CLI, ARM, or Terraform of course… The new thing here is the ability to create a cluster with Azure Arc. That allows you to use things like Azure Policy and Azure Monitor to control / observe your containers when you’re running them onprem (say using VMWare vSphere or Azure Stack HCl), or using Google Cloud or AWS. For now though we’ll just create a straight up cluster:

… which once you’re done with all the options should take about 5 minutes or so, on US West 3 region. A few notes here – you’re going to NOT want to set up Availability Zones (of course you would do this for a prod workload), and you want a STANDARD setup of 2 nodes (not Dev/Test, which would normally be the best pick) – because we’re going to want to experiment with Azure Monitor to check our observability. The AKS pricing tier you want is “free”, and the node count range is a new option – select “2-5”.

A quick snapshot of the bare bones setup we’re using here:

When that AKS cluster is finished being spun up, you’ll see something like the following:

What happened here exactly though? Select “Go to resource” – and you’ll be able to inspect what was created. For example, the Resources section shows any running deployments / pods, and it’s where you create new resources. In the Node pools, you can scale up/down by adding nodes – and add a new node pool, potentially even with a different (beefed up) VM size. In the Cluster config page, you can upgrade the control plane – and then the individual node pools in a followup step. This is also where you’d enable RBAC or integrate with Azure AD.

Insights though is where we can actually view the cluster’s utilization and how it performs under load:

From here it’s a walk in the park. You COULD download from GitHub the source materials for the book. I found selecting the quick start application gave me a very nice starting point… a simple Voting app that’s easy to create / destroy:

The next option to play with is the last one – “Connect to cluster”. From here you’re given all the information you need to connect via Bash or Azure Cloud Shell to your newly created resources. This is where you can run some of the commands noted in the book as we’re starting to play around with cmd line explorations –

kubectl get node 

az aks get-credentials --resource-group rg-handsonaks --name handsonaks

… And that’s it for now. You can easily go into the control panel again and remove the entire resource group to bring yourself back to a clean start state.

Closing Thoughts and Next Up

I feel like here’s a good point though to talk about the WHY of things… Software development seems to be making these leaps forward about every decade. In the early 2000’s, the big change took the form of a pattern and a practice – the pattern being Scrum and Agile, the technology / process taking the form of source control. Skip forward another 10 years, to say about 2014, and the leap forward was DevOps. Again this change becomes a pattern (Infra as Code), and a practice (CI/CD, and config mgmt)… The upcoming change seems to still be taking shape, but the 2020’s definitely seem to be the era when the pattern of microservices is achieving dominance – with the tech behind this being Kubernetes and Docker. The stuff we used to hear about “microservices only being for the large enterprises” or “Kubernetes isn’t meant for production workloads” is just not holding any water – it’s FUD.

Other things I want to play with down the road:

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.