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.
For ACP Session , we have created custom docker image with two steps
1. Created windows docker image with sql installed.
2. We have used step 1 to create custom ACP docker image
Below is screenshot where we are tagging the image as per the GCP repo , so that we can push the image to GCP
As per below Screenshot we are tagging the image and pushing it to the GCP repo.
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
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
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
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
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
Once we connect with acp pod using powershell , we can run the sql command with hostname as mariadb service name to check the connectivity
To ingress load balancer , we create the service for the acp_session using the acp_session_service.yml file
Once this is done , we will deploy acp_ingress yaml file it will do below steps
- It will create TLS cert using letsEncrypt
- We will provide custom domain to be used here we are using acp-dev.analytica.com
- The custom domain is mapped to acp_session_service
We can check url if the acp_session is working https://acp-dev.analytica.com/