diff --git a/README.md b/README.md index 426bfce4959ad0f425e0a829aca51889a3c8e3e3..cf497059659897eafec3564c077a782b94c1e14f 100644 --- a/README.md +++ b/README.md @@ -114,3 +114,40 @@ kubectl logs -n oop # Check Helm release status helm status oop-platform -n oop ``` + +## Mounting CA Certificates on kind + +If you need to mount custom CA certificates into the kind cluster, follow the steps below: + +Modify your kind cluster configuration file (cluster.yaml) to include the CA certificate mount: + +``` +kind: Cluster +apiVersion: kind.x-k8s.io/v1alpha4 +nodes: + - role: control-plane + extraMounts: + - hostPath: /path/to/your/ca-certificate.crt + containerPath: /path/to/your/ca-certificate.crt +``` + +Once the cluster is up, you need to update the CA certificates inside the kind nodes. Run the following script: + +``` +CERT=/path/to/your/ca-certificate.crt +CLUSTER=oop-cluster + +kind get nodes --name "$CLUSTER" | while read -r n; do + echo "==> Configuring CA on $n" + + docker exec "$n" sh -lc " + set -e + test -f $CERT || { echo 'CA cert not found'; exit 1; } + update-ca-certificates + systemctl restart containerd + systemctl restart kubelet + echo 'CA trust updated' + " +done + +```