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 the Google Cloud SDK to use for GKE 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 GKE:
-
Create the cluster:
-
Change to the directory that contains the cluster creation script:
$ cd /path/to/forgeops/cluster/gke
-
Source the script that contains the configuration for your cluster size. For example:
$ source ./small.sh
-
Run the cluster creation script[1]:
$ ./cluster-up.sh
If you’re prompted to install Google Cloud SDK beta components, enter Y to install them.
The script creates:
-
The cluster
-
The
ds-pool
node pool (for large clusters only) -
The
fast
storage class -
The
prod
namespace -
The
cluster-admin-binding
cluster role binding
-
-
To verify that the script created the cluster, log in to the Google Cloud console. Select the Kubernetes Engine option. You should see the new cluster in the list of Kubernetes clusters.
-
Run the kubectx command.
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 event-exporter-gke-5479fd58c8-6gbrj 2/2 Running 0 9m27s kube-system fluentbit-gke-bzztq 2/2 Running 0 9m10s kube-system fluentbit-gke-fxtzt 2/2 Running 0 9m11s kube-system fluentbit-gke-vqnjw 2/2 Running 0 9m9s kube-system gke-metadata-server-7fb5k 1/1 Running 0 9m9s kube-system gke-metadata-server-h6crf 1/1 Running 0 9m9s kube-system gke-metadata-server-xq88n 1/1 Running 0 9m9s . . .
-
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.
-