Last updated
Was this helpful?
Last updated
Was this helpful?
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:
Using the template, replace all generic/example values to production values. Let’s go through each folder.
Replace the example hostnames for ‘dnsNames’ with actual hostnames
In care-configmap.yaml, add database configurations and update the hostnames in CSRF_TRUSTED_ORIGINS and DJANGO_ALLOWED_HOSTS
In nginx.yaml, update the server_name with hostnames.
Install Helm[]
use the static IP created from "Reserve a static IP address" step to replace the IP value in helm/scripts.sh
Replace example hostnames with actual hostnames
Update care-secrets.yml
Update metabase.yml with metabase db credentials.
Set the default gke cluster
Get the name using: kubectl config get-contexts
Set the config: kubectl config use-context <name>
Run the helm script: bash helm/scripts.sh
Use kubectl to apply all the kubernetes yaml files in the following order
Deploy configmaps: kubectl apply -f 'configmaps/*'
Secrets: kubectl apply -f 'secrets/*'
Deployments: kubectl apply -f 'deployments/*'
Services: kubectl apply -f 'services/*'
Clusterissuer: kubectl apply -f ClusterIssuer/cluster-issuer.yaml
Certificate: kubectl apply -f certificate/certificate.yml
Ingress: kubectl apply -f ingress/care.yaml
Once ingress is created, kubectl get ingress care-ingress
will show the IP of the TCP load balancer.
Once the DNS records are added, the SSL will be automatically handled.
create DNS A records for each domain pointing to the static IP created from "Reserve a static IP address" step