Kubernetes cluster creation
This page describes the legacy CDM implementation, which will be deprecated in an upcoming release. We strongly recommend that you transition to the current CDM implementation as soon as possible. |
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-8h9cm 1/1 Running 0 81m kube-system aws-node-9ckfr 1/1 Running 0 82m kube-system aws-node-df9bh 1/1 Running 0 81m kube-system aws-node-rz6pw 1/1 Running 0 81m kube-system aws-node-wc44j 1/1 Running 0 82m kube-system aws-node-xx6q6 1/1 Running 0 81m kube-system coredns-65bfc5645f-fffhh 1/1 Running 0 103m kube-system coredns-65bfc5645f-k69g6 1/1 Running 0 103m kube-system ebs-csi-node-2tkgj 3/3 Running 0 79m kube-system ebs-csi-node-6skkk 3/3 Running 0 79m kube-system ebs-csi-node-bbp92 3/3 Running 0 79m kube-system ebs-csi-node-bz729 3/3 Running 0 79m kube-system ebs-csi-node-hc96q 3/3 Running 0 79m kube-system ebs-csi-node-ksm2s 3/3 Running 0 79m kube-system kube-proxy-59chh 1/1 Running 0 81m kube-system kube-proxy-9r6dl 1/1 Running 0 82m kube-system kube-proxy-9zvtw 1/1 Running 0 81m kube-system kube-proxy-c79qc 1/1 Running 0 82m kube-system kube-proxy-h4svc 1/1 Running 0 81m kube-system kube-proxy-j47n5 1/1 Running 0 81m kube-system metrics-server-5f4b6b9889-dr8bj 1/1 Running 0 79m kube-system snapshot-controller-bb7675d55-5vr2f 1/1 Running 0 79m kube-system snapshot-controller-bb7675d55-g2qjc 1/1 Running 0 79m
-
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.
-