Skip to main content

AKS Kubernetes Deployment

Here is the step by step guide that will help you to deploy GA Universe on Azure Kubernetes Service (AKS).

Generate YAML Files

To generate YAML files, you need install the following services

After successfully installing above two services, you need to clone the YAML generator by using this command:

git clone https://github.com/arsumelahi21/self-hosting-files.git

&

then Run the “YAMLgenerator.exe” as an Administration

Kube image 1

Following input will be required

NOTE: We are using the Babakom images just for testing purposes, we will replace with the original images when the code development will be completed.

  • Generate GitHub credentials? (y/n):
    n
  • Please enter domain:
    <your domain name>
  • Please enter namespace:
    <your domain name>
  • Please enter service image:
    babakomregistry.azurecr.io/bk-middleware-services:v1.0  
  • Please enter web image:
    babakomregistry.azurecr.io/bk-web-services:v1.0
  • Please enter notification image:
    babakomregistry.azurecr.io/bk-notification-services:v1.0
  • Please enter schedular image:
    babakomregistry.azurecr.io/bk-scheduler-services:v1.0
  • Please enter worker image:
    babakomregistry.azurecr.io/bk-worker-services:v1.0

All these commands will generate the Result folder inside the Executable folder containing YML files.

Deploy the created YAML Files

Run any of cmd, Powershell or gitbash in the created Result folder

and

Execute the following commands:

Ensuring the AKS Cluster is connected with the local system

kubectl get deployments --all-namespaces=true
kubectl create secret docker-registry regcred \
--docker-server=babakomregistry.azurecr.io \
--docker-username=babakomregistry \
--docker-password=cn3PYoHOc4DhNG0ppW0pUp7XgrbPXtrzdRkVFjIQD3+ACRA2/Bdc \
--docker-email=<your email> \
-n <namespace >

Note: Please ensure that your namespace, as already mentioned in the YAML generator, remain the same.

Now deploy each YAML file using the following commands

kubectl apply -f namespace.yml
kubectl config set-context --current --namespace=<namespace>
kubectl apply -f <your yaml file name> -n <your namespace>

Note: Please write the names of all the yml files, that are present in the Result folder.

Install NGINX Ingress Controller

In cmd, powershell, or bash, deploy NGINX Ingress Controller to your cluster by running the following command:

kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v1.8.2/deploy/static/provider/cloud/deploy.yaml

Enable SSL with Cert-Manager (if you want the SSL to be implemented on your domain)

To enable SSL for your AKS cluster you can get help from Cert-Manager Installation Documentation.

Connect Domain to Ingress

kubectl get ingresses

Kube image 2

Configure IP to the Domain Server

Note: To connect IP, to the domain server, we are using GoDaddy as an example. You can also choose other domain registry websites such as Namecheap, Bluehost, HostGator, etc.

Login to your domain registry website, or create an account if you don’t have one

Kube image 3

Click on DNS and then Add New Record button

Kube image 4

Now choose the type as CNAME

Kube image 5

Kube image 6

Now enter the Ingress Domain and the IP and click on Save button

Kube image 7

Note: Open the web domain in your browser, and you will be able to successfully load the GA Universe. In our case it’s http://www.gauniv.com