Build Infrastructure 15 Mins
We've tested automation that provisions the required infra.
Deploy Infrastructure
git clone https://github.com/opengovern/automation.git
cd automation/product-install/aws/eks
tofu init
tofu plan
tofu apply -auto-approve
Connect to Kubernetes Clusters; After infrastructure is provisioned, you will be an output similar to this:
configure_kubectl = "aws eks --region us-east-2 update-kubeconfig --name opencomply-abc123"
eks_cluster_name = "opencomply-abc123"
vpc_id = "vpc-0abc123def456ghi7"
Run the command provided by configure_kubectl command to connect to Kubernetes Cluster
Deploy Load Balancer
a. Create Ingress
Use a heredoc to define and apply the Ingress YAML, injecting environment variables for DOMAIN_NAME
and CERTIFICATE_ARN
.
kubectl apply -f - <<EOF
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
namespace: opencomply
name: opencomply-ingress
annotations:
alb.ingress.kubernetes.io/scheme: internet-facing
alb.ingress.kubernetes.io/target-type: ip
alb.ingress.kubernetes.io/backend-protocol: HTTP
alb.ingress.kubernetes.io/listen-ports: '[{"HTTP": 80}, {"HTTPS":443}]'
alb.ingress.kubernetes.io/certificate-arn: "$CERTIFICATE_ARN"
kubernetes.io/ingress.class: alb
spec:
ingressClassName: alb
rules:
- host: "$DOMAIN_NAME"
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: nginx-proxy # Replace with actual service name if different
port:
number: 80
EOF
b. Retrieve the Load Balancer DNS Name:
LB_DNS=$(kubectl get ingress opengovernance-ingress -n opengovernance -o jsonpath='{.status.loadBalancer.ingress[0].hostname}')
echo "Load Balancer DNS: $LB_DNS"
c. Create DNS Records
Host/Name: demo.opengovernance.io