Deployment on EKS
1. Configuring OIDC Providers and IAM for EKS
Associate the OIDC provider with the testGeonode
cluster:
eksctl utils associate-iam-oidc-provider --region us-east-1 --cluster testGeonode --approve
2. Creating the IAM Service Account for AWS Load Balancer Controller
To create the IAM service account and the required policy for the AWS Load Balancer Controller:
Create the IAM policy from the policy file:
curl -o iam_policy.json https://raw.githubusercontent.com/kubernetes-sigs/aws-load-balancer-controller/main/docs/install/iam_policy.json
aws iam create-policy --policy-name AWSLoadBalancerControllerIAMPolicy --policy-document file://iam_policy.json
Create the IAM service account:
eksctl create iamserviceaccount \
--cluster=testGeonode \
--namespace=kube-system \
--name=aws-load-balancer-controller \
--attach-policy-arn=arn:aws:iam::XXX:policy/AWSLoadBalancerControllerIAMPolicy \
--override-existing-serviceaccounts \
--approve
3. Installing AWS Load Balancer Controller with Helm
Add the EKS Helm repository and update:
helm repo add eks https://aws.github.io/eks-charts
helm repo update
testGeonode
cluster:
helm install aws-load-balancer-controller eks/aws-load-balancer-controller \
-n kube-system \
--set clusterName=testGeonode \
--set serviceAccount.create=false \
--set serviceAccount.name=aws-load-balancer-controller \
--set region=us-west-1 \
--set vpcId=vpc-XXX \
--set replicaCount=2
kubectl get deployment -n kube-system aws-load-balancer-controller
4. Installing and Configuring the EBS CSI Controller
Install the EBS CSI Driver addon on the testGeonode
cluster:
eksctl create addon --name aws-ebs-csi-driver --cluster testGeonode --region us-east-1
Migrate to pod identity if necessary:
eksctl utils migrate-to-pod-identity --cluster testGeonode --region us-east-1 --approve
Verify the EBS CSI Driver pods:
kubectl get pods -n kube-system -l app.kubernetes.io/name=aws-ebs-csi-driver
5. Creating Kubernetes Secrets for Docker Registry
Create a Docker registry secret:
kubectl create secret docker-registry registrykey \
--docker-server=registry.kan.com.ar \
--docker-username=XXX \
--docker-password=XXX \
--docker-email=XXX
6. Deploying Kubernetes Resources
To deploy these files in order, follow this workflow:
- Cluster and StorageClass
cluster.yaml
inclusterEksctl
(if the cluster is not yet created).local-storageclass.yaml
inconfigs/storageclass
(to set up the StorageClass before creating volumes).
- Database
- ConfigMap:
gndatabase-configmap.yaml
indatabase/configmaps
. - PVC:
dbdata-pvc.yaml
indatabase/volumes
. - Deployment:
gndatabase-deployment.yaml
indatabase/deployments
. - Service:
gndatabase-service.yaml
indatabase/services
.
- ConfigMap:
- gn-cloud Components
- ConfigMaps in
gn-cloud/configmaps
(to ensure all configurations are available). - PVCs:
statics-pvc.yaml
andtmp-pvc.yaml
ingn-cloud/volumes
. - Deployments:
deploy celery
,django
,mapstore
,memcache
, andredis
ingn-cloud/deployments
. - Services for each component in
gn-cloud/services
.
- ConfigMaps in
- gs-cloud Components
- ConfigMaps in
gs-cloud/configmaps
(to ensure all configurations are ready). - PVCs:
geowebcache-data-persistentvolumeclaim.yaml
andrabbitmq-data-persistentvolumeclaim.yaml
ings-cloud/volumes
. - Deployments:
deploy acl
,gateway
,gwc
,rabbitmq
,rest
,wcs
,webui
,wfs
, andwms
ings-cloud/deployments
. - Services in
gs-cloud/services
.
- ConfigMaps in
- Ingress
- Finally, apply
geonode-ingress.yaml
inconfigs/ingress
to expose services externally.
- Finally, apply
After completing these steps, verify the status of the pods and services.