---
title: Kubernetes cluster creation
description: ForgeRock provides Terraform artifacts for GKE cluster creation. Use them when you deploy the CDM. After deploying the CDM, you can use your cluster as a sandbox to explore Ping Identity Platform customization.
component: forgeops
version: 7.4
page_id: forgeops::cdm/gke/setup/cluster
canonical_url: https://docs.pingidentity.com/forgeops/7.4/cdm/gke/setup/cluster.html
keywords: ["CDM", "GKE", "Kubernetes Cluster", "Terraform", "Ingress Controller", "NGINX", "Certificate Manager"]
section_ids:
  next_step: Next step
---

# Kubernetes cluster creation

ForgeRock provides Terraform artifacts for GKE cluster creation. Use them when you deploy the CDM. After deploying the CDM, you can use your cluster as a sandbox to explore Ping Identity Platform customization.

When you [create a project plan](../../../start/start-here.html#planning), 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 ForgeOps Team followed to create a Kubernetes cluster on GKE:

1. Create a cluster using Terraform artifacts in the `forgeops-extras` repository:

   1. Change to the directory that contains Terraform artifacts:

      ```
      $ cd /path/to/forgeops-extras/terraform
      ```

   2. Run the tf-apply script to create your cluster:

      ```
      $ ./tf-apply
      ```

      Respond `yes` to the `Do you want to perform these actions?` prompt.

      When the tf-apply script finishes, it issues a message that provides the path to a kubeconfig file for the cluster.

      The script creates:

      * The GKE cluster

      * The `fast` storage class

      * The `ds-snapshot-class` volume snapshot class

      The script deploys:

      * An ingress controller

      * Certificate manager

2. Set your Kubernetes context to reference the new cluster by setting the `KUBECONFIG` environment variable as shown in the message from the tf-apply command's output.

3. To verify that the tf-apply script created the cluster, log in to the Google Cloud console. Select the Kubernetes Engine option. The new cluster should appear in the list of Kubernetes clusters.

4. Get the ingress controller's external IP address:

   ```
   $ kubectl get services --namespace ingress-nginx
   NAME                                 TYPE           CLUSTER-IP   EXTERNAL-IP      PORT(S)                      AGE
   ingress-nginx-controller             LoadBalancer   10.4.6.154   35.203.145.112   80:30300/TCP,443:30638/TCP   58s
   ingress-nginx-controller-admission   ClusterIP      10.4.4.9     <none>           443/TCP                      58s
   ```

   The ingress controller's IP address should appear in the `EXTERNAL-IP` column. There can be a short delay while the ingress starts before the IP address appears in the `kubectl get services` command's output; you might need to run the command several times.

5. Configure hostname resolution for the ingress controller:

   1. Choose an FQDN (referred to as the *deployment FQDN*) that you'll use when you deploy the Ping Identity Platform, and when you access its GUIs and REST APIs.

      Examples in this documentation use `cdm.example.com` as the deployment FQDN. You are not required to use `cdm.example.com`; you can specify any FQDN you like.

   2. If DNS does not resolve your deployment FQDN, add an entry to the /etc/hosts file that maps the ingress controller's external IP address to the deployment FQDN. For example:

      ```
      35.203.145.112 cdm.example.com
      ```

## Next step

* [icon: check-square-o, set=fa][Become familiar with the CDM](../../intro.html)

* [icon: check-square-o, set=fa][Understand CDM architecture](../../architecture.html)

* [icon: check-square-o, set=fa][Set up your local environment and create a cluster](../../setup-cdm.html)

* [icon: square-o, set=fa]*[Deploy the platform](../../deploy.html)*

* [icon: square-o, set=fa][Access platform UIs and APIs](../../access.html)

* [icon: square-o, set=fa][Plan for production deployment](../../next-steps.html)
