Actual IT Things

February 23, 2017

These are just my notes for my own use it's easier having them online then in a file somewhere.

This will be a collection of basic notes about using Azure Clustered Services, working with Microsoft Academy tutorials.

I use Windows to do most of this because my office desktop is the Windows and I spend most of my life inside Excel and Visio

Azure Clustered Services

The docker swarm just didn't seem to work correctly, I have an outstanding call with Azure Support about it, but I doubt I will get anywhere.

Getting Kubernetes to Work

First Steps

Install the Azure 2.0 CLI, not the msi installer, the 2.0 version. Requires downloading python so install that Python.

x: pip install azure-cli

Now you can log into your Azure instance

x: az login

It will tell you to go to web page and enter some details.

Next set your account sub.
az account list

az account set --subscription="enterYourSubHere"

Next, create a service principal this allows Kubernetes to access your Load balancers and create user defined routes.

az ad sp create-for-rbac --role"Contributor" --scopes="/subscriptions/enterYourSubHere"

This will produce several rows of output, you require the "appID" and the "password".

Next, create the Kubernetes instance using the Azure Container Service deployment option in your Azure portal. Make sure you set the subscription to be the same as the one you used for the service principle.

Next, you can install the cli
az acs kubernetes install-cli --install-location=x:\app\kubectl.exe

Also, you can get your credentials.

MS Documentation

az acs list

From this you use the resource group and the name, now the name you need is the one that starts containerservice-.

az acs kubernetes get-credentials --resource-group=enterYourResourceGroup --name=enterYourName

Now it shold work,

PS J:\app> .\kubectl.exe get nodes NAME STATUS AGE
k8s-agent-d591a293-0 Ready 43m
k8s-agent-d591a293-1 NotReady 43m
k8s-agent-d591a293-2 Ready 43m
k8s-master-d591a293-0 Ready,SchedulingDisabled 43m

Oh right yeah, Azure, so for some reason, one of my nodes just sat there saying it was not ready. I ponder a while and after ten minutes and logging onto the box from the master it all seemed to work.

For ease of admin, you may want to deploy your private key onto the master node.

Selecting Nodes

This requires some node tagging so we can direct pods to specific servers.
disktype: ssd

Initalise and update
helm init helm repo update

Pod = group of containers tied together.

kubectl get pods -owide Gives more details.

Google is a bit different and doesn't include some things - as is normal.

You will need to set up KUBECONFIG and the google application credentials before you get started.