# Configure GKE workloads

Once the cloud resources are created, we can deploy our applications as Kubernetes workloads. The necessary YAML files can be found as a template in the link below.

Template repo: <https://github.com/coronasafe/infra_template>

### Editing the template repo

Using the template, replace all generic/example values to production values. Let’s go through each folder.

### **Certificate**

1. Replace the example hostnames for ‘dnsNames’ with actual hostnames

### **Configmaps**

1. In care-configmap.yaml, add database configurations and update the hostnames in CSRF\_TRUSTED\_ORIGINS and DJANGO\_ALLOWED\_HOSTS
2. In nginx.yaml, update the server\_name with hostnames.

### **Helm**

1. Install Helm\[[Ref](https://helm.sh/docs/intro/install/)]
2. use the static IP created from "Reserve a static IP address" step to replace the IP value in helm/scripts.sh

### **Ingress**

1. Replace example hostnames with actual hostnames

### **Secrets**

1. Update care-secrets.yml
2. Update metabase.yml with metabase db credentials.

### Applying Configurations

1. Set the default gke cluster
   1. Get the name using: `kubectl config get-contexts`
   2. Set the config: `kubectl config use-context <name>`
2. Run the helm script: `bash helm/scripts.sh`
3. Use kubectl to apply all the kubernetes yaml files in the following order
   1. Deploy configmaps: `kubectl apply -f 'configmaps/*'`
   2. Secrets: `kubectl apply -f 'secrets/*'`
   3. Deployments: `kubectl apply -f 'deployments/*'`
   4. Services: `kubectl apply -f 'services/*'`
   5. Clusterissuer: `kubectl apply -f ClusterIssuer/cluster-issuer.yaml`
   6. Certificate: `kubectl apply -f certificate/certificate.yml`
   7. Ingress: `kubectl apply -f ingress/care.yaml`
4. Once ingress is created, `kubectl get ingress care-ingress` will show the IP of the TCP load balancer.
5. Once the DNS records are added, the SSL will be automatically handled.

### Add DNS records

create DNS A records for each domain pointing to the static IP created from "Reserve a static IP address" step


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://deploydocs.coronasafe.network/cloud-deployment-overview/google-cloud-deployment/configure-gke-workloads.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
