Creating a cluster

Connect Microsoft Azure and Kublr

  1. Log into Kublr using your credentials.
  2. Click on the Credentials menu in the left navigation menu bar Credentials
  3. Click Add Credentials Add Credentials
  4. Under credential type, select Azure Credentials.
  5. Enter Credentials Name (e.g. Test).
  6. Enter Tenant ID, Subscription ID, Client ID and Client Secret from the steps above.
  7. Click Save Credentials.
  8. “Credentials have been successfully created” popup appears.
  9. Click to verify if credentials are valid and ready to be used

Create a Cluster

Create a Kubernetes Cluster in Kublr

  1. Click on Cluster Menu in the left navigation menu bar Cluster Menu
  2. Click on Add New Cluster Add New Cluster
  3. Enter cluster name Cluster Name
  4. Select Provider: Microsoft Azure Azure Provider
  5. Select Region Select Region
  6. Select credentials created and/or saved in point 2.
  7. Select operating system to be used for Kublr cluster instances Select OS
  8. Select number of master nodes and instance type Select Instance Type
  9. Select number of worker nodes and instance type Select Word Nodes
  10. Click Confirm and Install. Congratulations box appears “Your cluster is being created. It might take a few minutes.”.

kubectl

Install and Configure kubectl

For more details, please refer to the official Kubernetes documentation

For Mac users:

curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/darwin/amd64/kubectl
chmod +x ./kubectl
sudo mv ./kubectl /usr/local/bin/kubectl

For Windows users:

  1. Download https://storage.googleapis.com/kubernetes-release/release/v1.7.0/bin/windows/amd64/kubectl.exe
  2. Include the path with the kubectl executable to PATH environment variable. More details: https://msdn.microsoft.com/en-us/library/office/ee537574(v=office.14).aspx

Copy Kublr config File

To retrieve config from Kublr:

  1. Click on cluster in the cluster list to access the cluster details page
  2. On the overview tab, download the config file Config File

For Mac users:

mkdir ~/.kube
cp ~/Downloads/config.yaml ~/.kube/config

For Windows users:

cd %HOME%
mkdir .kube
copy %HOME%\Downloads\config.yaml .kube\

Check that kubectl is working and using right config file:

kubectl config view
kubectl cluster-info

Helm

Install and Use Helm to Deploy WordPress to Your Cluster

Install helm Click here for detailed guidelines.

For Mac users:

curl https://raw.githubusercontent.com/kubernetes/helm/master/scripts/get > get_helm.sh
chmod +x get_helm.sh
./get_helm.sh --version v2.5.0

For Windows users:

  1. Download helm version 2.5.1 from here: https://github.com/kubernetes/helm/releases:
  2. Extract helm-v2.5.1-windows-amd64.zip to the directory where kubectl is saved

Init and test Helm installation:

helm init

Install WordPress

> NOTE: It may take a few minutes for the LoadBalancer IP to become available.

**For Mac users:**

``` bash
export SERVICE_IP=$(kubectl get svc --namespace default wordpress-wordpress -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
echo http://$SERVICE_IP/admin
echo Username: user
echo Password: $(kubectl get secret --namespace default wordpress-wordpress -o jsonpath='{.data.wordpress-password}' | base64 --decode)

Open the browser and navigate to the URL from console output.

For Windows users:

  1. Run the following commands to get hostname and password: kubectl get svc --namespace default wordpress-wordpress -o jsonpath='{.status.loadBalancer.ingress[0].ip}' kubectl get secret --namespace default wordpress-wordpress -o jsonpath='{.data.wordpress-password}
  2. Open browser to http://%hostname%/admin, where %hostname% is the hostname you got from the kubectl
  3. Decode admin password with https://www.base64decode.org/

Congrats! You just deployed your first app in a Kubernetes cluster with Kublr.