Write a FastAPI server to create a highly available K3s cluster on Azure Virtual Machine using just simple API endpoints. Deploy CloudNativePG in the K3s cluster using Helm charts.
- Create a K3s cluster with High Availability using Embedded etcd for fault tolerance.
- Deploy the CloudNativePG to the K3s cluster using Helm charts. The PostgreSQL database should have an HTTP endpoint to connect.
- Configure DNS to point a custom domain name to the K3s cluster's load balancer IP.
- Creates the Azure nodes and K3s cluster.
- Deploys the PostgreSQL (CloudNativePG) database.
- Configures DNS.
- Document the architecture and steps in a README file.
- Use Azure SDK directly or Pulumi for provisioning Azure resources.
- For more information on using the Azure SDK for Python, refer to Azure SDK for Python.
- For Pulumi, check out Pulumi Azure Documentation.
- Implement Ingress Nginx Controller as a reverse proxy to handle incoming requests and provide SSL termination.
- Implement Cert Manager to manage SSL certificates.
- Setting up monitoring and logging for the cluster.
Please provide the automation script, Helm charts, and documentation in a GitHub repository. Be prepared to walk through your solution and discuss the architecture and technologies used.