Kubernetes Cluster Creation
ForgeRock provides shell scripts based on AWS CloudFormation to use for EKS cluster creation. Use them when you deploy the CDM. After you’ve finished deploying the CDM, you can use the CDM as a sandbox to explore a different infrastructure-as-code solution, if you like.
When you Create a Project Plan, you’ll need to identify your organization’s preferred infrastructure-as-code solution, and create your own cluster creation automation scripts, if necessary.
Here are the steps the Cloud Deployment Team followed to create a Kubernetes cluster on EKS:
-
Create your cluster:
-
Change to the directory that contains the cluster creation script:
$ cd /path/to/forgeops/cluster/eks
-
Run the cluster creation script. Specify the YAML file that contains the configuration for your cluster size. For example[1]:
$ ./cluster-up.sh small.yaml
To verify that the cluster has been created, log in to the AWS console. Select the EKS service link. You should see the new cluster in the list of Amazon EKS clusters.
-
Run the kubectx command:
$ kubectx . . .
user.name@small.us-east-1.eksctl.io
The output should contain your newly created cluster and any existing clusters.
The current context should be set to the context for your new cluster.
-
-
Set context to the
prod
namespace:$ kubens prod
-
Check the status of the pods in your cluster until all the pods are ready:
-
List all the pods in the cluster:
$ kubectl get pods --all-namespaces NAMESPACE NAME READY STATUS RESTARTS AGE kube-system aws-node-4fzmz 1/1 Running 0 9m28s kube-system aws-node-btkf9 1/1 Running 0 9m23s kube-system aws-node-gbw6b 1/1 Running 0 9m3s kube-system aws-node-gtp2x 1/1 Running 0 9m1s kube-system aws-node-klv4t 1/1 Running 0 9m28s kube-system aws-node-znjt6 1/1 Running 0 9m4s kube-system coredns-75b44cb5b4-nm824 1/1 Running 0 25m kube-system coredns-75b44cb5b4-xlwpn 1/1 Running 0 25m kube-system kube-proxy-4gxgw 1/1 Running 0 9m3s kube-system kube-proxy-bb4sr 1/1 Running 0 9m28s kube-system kube-proxy-knw77 1/1 Running 0 9m28s kube-system kube-proxy-kwq22 1/1 Running 0 9m1s kube-system kube-proxy-ptpnf 1/1 Running 0 9m23s kube-system kube-proxy-zt4t2 1/1 Running 0 9m4s kube-system metrics-server-5f956b6d5f-nhpmd 1/1 Running 0 12m8s
-
Review the output. Deployment is complete when:
-
The
READY
column indicates all running containers are available. The entry in theREADY
column represents [total number of containers/number of available containers]. -
All entries in the
STATUS
column indicateRunning
orCompleted
.
-
-
If necessary, continue to query your cluster’s status until all the pods are ready.
-