Skip to content

Latest commit

 

History

History
46 lines (27 loc) · 2.58 KB

01-prerequisites.md

File metadata and controls

46 lines (27 loc) · 2.58 KB

Prerequisites

Microsoft Azure

This tutorial leverages Microsoft Azure to streamline provisioning of the compute infrastructure required to bootstrap a Kubernetes cluster from the ground up. I will be leveraging a personal Azure subscription that I have however, Sign up for $200 in free credits.

Estimated cost to run this tutorial: $0.23 per hour ($5.50 per day).

The compute resources required for this tutorial may exceed the Microsoft Azure free tier.

Microsoft Azure Cloud Platform SDK

Install the Azure CLI 2.0

Follow the Microsoft Azure CLI 2.0 documentation to install and configure the az command line utility.

You can also install the command line interface using a package manager like brew (mac), choco (windows), apt (linux), etc.

Verify the Microsoft Azure CLI 2.0 version is 2.1.0 or higher:

az --version

Imperative vs Declarative Infrastructure

Infrastructure as Code (IaC) is the process of managing and provisioning infrastructure through machine-readable definition files. There are generally two approaches to IaC: declarative (functional) and imperative (procedural). The difference between declarative and the imperative approach is essentially 'what' versus 'how'. Specfically for this tutorial AZ CLI (imperative) versus Terraform (declarative). Terraform is one of many IaC tools that can be used currently but I would argue that it is the most popular currently.

Install the Terraform CLI

Follow the Terraform documentation to install and configure the terraform command line utility. For sake of simplicy I install most of my development environment using a package manager (brew) as I work predominantly on a Mac.

Set a Default Compute Region and Zone

This tutorial will be utilizing a Service Principal created using azure-cli. This 'service account' method of authenticating ideally is not recommended for interactive development but in later steps we will implement automation for infrastructure creation.

Use the following command to generate a service principal within your Azure account.

az ad sp create-for-rbac --name "hashicorp"

The following items are required for Terraform to authenticate to Azure to deploy resources.

  • Tenant ID
  • Subscription ID
  • Client ID
  • Client Secret

Next: Installing the Client Tools