Azure AKS
In the first sections of the content, step by step from the beginning; AKS installation, resource creation, usage and external MongoDb and ElasticSearch server steps are described.
If there is a ready cluster on AKS, you can start directly from step 5 Installing Apinizer on AKS.
1. Introduction
What is Microsoft AKS (Azure Kubernetes Service)?
Azure is a complete cloud platform that facilitates new application development processes by hosting existing applications.
Azure Kubernetes Service (AKS) enables creating, configuring and managing a pre-configured virtual machine cluster to run containerized applications.
When you deploy an AKS cluster, Master nodes and all other kubernetes nodes are deployed and configured on your behalf.
2. Installing and Configuring AKS, AKS CLI and kubectl
AKS Cluster Installation
Since Azure contains a structure targeting ease of use, installation can be done easily by proceeding with default settings if no special setting is requested.

Click the links selected in the image below in order to create a Kubernetes cluster.

A new resource group (Resource group) can be created if there is no existing selection for the name to be given to the cluster to be created.
Kubernetes version 1.18 or 1.20 major type can be selected.

Adding Node Pool
Node Pool (Node Pool) contains settings related to nodes within the cluster. You can select an existing node definition or create a new definition.

The screenshot containing the name to be given to the node pool and the selectable settings is below:

Authentication Settings
In the Authentication section, you can set how you want to restrict your cluster.

Networking Settings
The Networking tab includes whether you will leave network settings to Kubenet or Azure CNI, which draft you want your DNS name in, and security and network settings related to access.

Integration Settings
In the Integrations tab, your decisions regarding some useful integrations provided by Azure are set.

In the final step, your settings go through a review mechanism and are presented for your approval.

When you complete the process, you will encounter a screen like below.

After creating your cluster, the AKS CLI and kubernetes-related system to be installed on your computer can be checked.
3. AKS CLI Installation
Azure CLI can be installed on Windows, MacOS and Linux environments. It can also be run in a Docker container.
The version of Azure CLI suitable for the operating system can be downloaded and installed from: Azure CLI Installation Guide
Then connect to your client account on your computer with the following command and the subsequent process.
az login
CLI can open your default browser and load an Azure sign-in page.
Otherwise, open a browser page and go to: https://aka.ms/devicelogin. Enter the authorization code displayed in your terminal.
If there is no web browser or the web browser cannot be opened, use the device code flow with the az login --use-device-code command.
Sign in to the browser with your account credentials.
Then the Kubernetes command line tool kubectl should be downloaded and installed.
az aks install-cli
Access credentials should be obtained for a managed Kubernetes cluster.
By default, credentials are merged in the .kube/config file, so kubectl can use them.
You can configure the default group using the name of the managed cluster and the name of the resource group:
az aks get-credentials --resource-group myResourceGroup --name myAKSCluster
Whether access is provided correctly is checked with the following command.
kubectl get nodes
4. Installing and Setting Up Cloud MongoDb and ElasticSearch
As stated in the Installation and Configuration document, Replicaset MongoDB and Elasticsearch are needed. These can be installed on any virtual server, used as cloud, or if they already exist, proceed to the next step.
In this section, cloud systems in the applications' own environments are used.
-
For MongoDB, go to MongoDB Atlas and create an account, and it can be used free of charge up to a limited DB size. Apinizer does not need a large database because it only keeps configuration definitions in MongoDB.
-
For Elasticsearch, Apinizer can be defined by using an elastic service in the cloud environment through the Elastic Cloud address.
MongoDB Cloud Settings
After creating an account from MongoDB's own site, create a database with the desired name and edit the related settings.
Click the Add IP Address button from the Network Access menu for access permission.

Then fill in the fields so that access is open from anywhere, such as the desired IPs or the Allow Access From Anywhere option selected in the image below.

Getting MongoDB connection string:
To get the connection string (Connection String) that will provide the connection to the created database, return to the Databases page and press the Connect link.
From here, you can get the necessary information to connect to any MongoDb database editor yourself, or press the Connect your application button to connect the Apinizer application.

When Java is selected as Driver and "3.4" or higher is selected as Version on the opened screen, a text appears at the bottom of the screen.

This text is the connection definition that you will write to the apinizer-deployment.yaml file in the following sections to connect Apinizer to MongoDB.