User:Naresh

                 Deploying ACP MariaDB and ACP Session to K8S

We have created custom images from the local system for the MariaDB and ACP to deploy pods on the GCP K8s Engine


MariadB docker file contains below Details:


The Docker file contains the Image used and we are installing the mariadb-client on the image , once the image is created this is pushed to GCP image repository

Mariadb-Client is installed to connect locally from HeidiSQL APP.

Mariadb Docker FIle.png





For ACP Session , we have created custom docker image with two steps

1. Created windows docker image with sql installed.

Image.png




2. We have used step 1 to create custom ACP docker image

ACP Session Image.png


Below is screenshot where we are tagging the image as per the GCP repo , so that we can push the image to GCP

Acp session tagged images.png

As per below Screenshot we are tagging the image and pushing it to the GCP repo.

Custom Image tagging and Pushing to GCP.png

We can check list of images which are pushed to acp-repo in the GCP k8s by using the below command


gcloud artifacts docker images list us-west1-docker.pkg.dev/supple-lattice-206522/acp-repo

From GCP , K8s we need to deploy the mariadb pod using the acp_mariadb.yaml.

10GB Volume is created in GCP using the create_pvc.yml file which is sued for mariadb to store data

Create pvc.png


Below Steps are performed by using this below acp_mariadb.yaml file

1.We are using separate namespace called acp-dev

2.We are using the custom image which we pushed to GCP repo

3. We are attaching a 10GB volume to store mariadb db data

Acp mariadb yaml file .png

We need to deploy mariadb service acp_mariadb_service.yml while deploying acp_session pod we will provide the details of mariadb service to connect with mariadb from acp_session pod

Below is the yaml for mariadb_service

Acp mariadb service yaml file.png

We need to deploy acp_session yaml file which contains mariadb service

One more important thing , we need to remember is , the acp session pod should be running on the windows node , so for the acp session pod to be running only on windows node we need provide toleration in the yaml file so that whenever a new pod is getting created for acp session it has scheduled on windows node

Acp toleration for windows.png
ACP Session yaml file.png

BY using the below command , we can check the pods which are deployed for mariadb and acp_session

kubectl get pods


To check on which nodes the pods are running on , we can use below command

kubectl get pods -o wide


Once the acp_session pod is created we can test the connectivity from acp pod to mariadb service

ACP POD.png

Once we connect with acp pod using powershell , we can run the sql command with hostname as mariadb service name to check the connectivity

Mariadb db connectivity testing from acp pod.png

To ingress load balancer , we create the service for the acp_session using the acp_session_service.yml file

Acp session service.png

Once this is done , we will deploy acp_ingress yaml file it will do below steps

  1. It will create TLS cert using letsEncrypt
  2. We will provide custom domain to be used here we are using acp-dev.analytica.com
  3. The custom domain is mapped to acp_session_service
Acp ingress controller.png

We can check url if the acp_session is working https://acp-dev.analytica.com/

Acp url .png