This project provides a Terraform configuration to set up a DeployKF on a Civo Kubernetes cluster.
- Civo account with API key
- Terraform installed on your system
- Kubernetes client (e.g., Lens, kubectl, k9s etc) for interacting with the cluster
To set up and deploy the Kubernetes cluster, follow these steps:
- Create
vars.tfvars
from the template:
civo_token = "your_civo_api_key"
region = "your_civo_region" # Change to your preferred region. Default is "LON1".
Replace "your_civo_api_key"
with your actual Civo API key.
- Initialize Terraform:
terraform init
- Plan the Terraform configuration:
terraform plan --var-file="vars.tfvars"
- Apply the Terraform configuration:
terraform apply --var-file="vars.tfvars"
- Retrieve the kubeconfig from the Civo dashboard and load it into kubecontext.
DeployKF is deployed through ArgoCD, which is already installed on the cluster provisioned through Terraform. You can access the ArgoCD Web UI to see the DeployKF application being deployed. This is optional but recommended to see if anything goes wrong during the deployment.
You can first expose the ArgoCD service by patching the service to use a LoadBalancer:
kubectl patch svc argocd-server -n argocd -p '{"spec": {"type": "LoadBalancer"}}'
You can then access ArgoCD using the LoadBalancer IP address. The default username is admin
, and the password can be retrieved using:
echo $(kubectl -n argocd get secret/argocd-initial-admin-secret -o jsonpath="{.data.password}" | base64 -d)
- Apply the Kyverno configuration:
kubectl apply -f kyverno.yaml
- Apply the DeployKF configuration:
kubectl apply -f deploykf-values.yaml
After this step you should see a deploykf App of Apps application in the ArgoCD UI.
- Run the ArgoCD apps sync script:
bash sync_argocd_apps.sh
- Common issues and their solutions will be documented here. For more information on troubleshooting DeployKF, please refer to the official documentation.
vars.tfvars
: Contains the Civo API key and other variables for Terraform.kyverno.yaml
: Configuration for Kyverno, a Kubernetes policy engine.deploykf-values.yaml
: Configuration for DeployKF, a Kubernetes deployment tool.
- Contributions are welcome. Please submit pull requests or issues on our GitHub repository.
- For support, please contact raise a GitHub issue in this repository.