Creating and Accessing Clusters

Page last updated:

This topic describes how to create a cluster with Pivotal Container Service (PKS) so that you can access it through Pivotal Ingress Router.

Create a Cluster

The procedure for creating clusters is the same as described in Creating Clusters in the PKS documentation. However, you must ensure the hostname you use matches a domain name for which DNS has been configured.

To create a cluster, run:

pks create-cluster CLUSTER-NAME -e HOSTNAME -p PLAN-NAME --wait


Argument Description
CLUSTER-NAME A name you choose for the cluster.

Note: While not required, it may be useful to establish a pattern for the relationship between CLUSTER-NAME and HOSTNAME.

HOSTNAME A FQDN for which DNS has been configured. The FQDN must resolve to the IP of the load balancer in front of the Ingress Gateway component of Pivotal Ingress Router. See Configure gateway DNS and load balancer in Installing Ingress Router.

If DNS has been configured for *, you can specify a FQDN such as
PLAN-NAME The plan for your cluster. Run pks plans to list your available plans.

For example:

$ pks create-cluster mycluster -p myplan

Access a Cluster

To access a cluster:

  1. Run the following command to retrieve credentials for the cluster:

    pks get-credentials CLUSTER-NAME 
  2. Run any desired kubectl commands, such as the following:

    kubectl cluster-info

For more information about accessing clusters, see Retrieving Cluster Credentials and Configuration in the PKS documentation.