This project contains the necessary files to deploy the DataDrift application using Kustomize.
Make sure you have the following tools installed before getting started:
- Kustomize
- Kubectl
- An available Kubernetes cluster
To deploy the DataDrift application, follow the steps below:
- Clone this repository to your local machine:
git clone https://github.com/data-drift/data-drift- Navigate to the project directory:
cd data-drift/self-hosting/k8s- Configure your secrets by creating a
.env.secretfile. You can use the provided.env.secret.exampletemplate as a starting point:
cp .env.secret.example .env.secretModify the .env.secret file by adding the appropriate values for your secrets.
- Download the private-key.pem file from your github application
Go to the Github App page and download a private key, then move it in this folder
cp ~/Download/your-freshly-downloaded.private-key.pem ./private-key.pem- Configure the ingress
In the ingress file, replace the -host: datadrift.REPLACE_WITH_YOUR_DOMAIN in the rules section
In the ingress file, replace the -datadrift.REPLACE_WITH_YOUR_DOMAIN in hosts section
- Create a namespace for datadrift and apply the deployment resources using Kustomize:
kubectl create namespace datadrift
kubectl apply -k .This will apply the following resources:
- Service: Defines how the DataDrift application will be exposed.
- Deployment: Deploys the DataDrift application containers to the Kubernetes cluster.
- Ingress: Configures traffic routing to the DataDrift application.
- Verify that the deployment was successful:
kubectl get pods -n datadrift
kubectl get services -n datadrift
kubectl get ingress -n datadriftMake sure the pods are running, the service is exposed, and the ingress is properly configured.
- Check the pod and the github credentials
Either go to the datadrift.yourdomain.com or bind a port to your localhost
kubectl port-forward datadrift-6df8ff84c5-bq2p5 8082:8080 -n datadriftGo to your URL localhost:8082 you should see {"status":"OK"}. Go to localhost:8082/ghhealth you should see {"status":"OK"}.