LATEST VERSION: v1.2 - RELEASE NOTES
Pivotal Container Service v1.2

Using Network Profiles (NSX-T Only)

Page last updated:

This topic describes how to create and use network profiles for Kubernetes clusters provisioned with Pivotal Container Service (PKS) on vSphere with NSX-T integration.

To define a network profile using JSON, see Defining Network Profiles.

Required Permissions

Only PKS administrators can create and delete network profiles. For more information, see the following topics:

Kubernetes managers can list existing network profiles, assign them to clusters, and view cluster details. For more information, see the following topics:

Create a Network Profile

After you define your network profile as described in Defining Network Profiles, run the following command:

pks create-network-profile PATH-TO-YOUR-NETWORK-PROFILE-CONFIGURATION

Where PATH-TO-YOUR-NETWORK-PROFILE-CONFIGURATION is the path to the JSON file you created when defining the network profile.

For example:

$ pks create-network-profile np-routable-pods.json

Network profile small-routable-pod successfully created

Only cluster administrators, pks.clusters.admin, can create network profiles. If a cluster manager, pks.clusters.manage, is attempting to create a network profile, the following error occurs:

You do not have enough privileges to perform this action. Please contact the PKS administrator.

Delete a Network Profile

To delete a network profile, run the following command:

pks delete-network-profile NETWORK-PROFILE-NAME

Where NETWORK-PROFILE-NAME is the name of the network profile you want to delete.

Note: You cannot delete a network profile that is in use.

Only cluster administrators, pks.clusters.admin, can delete network profiles. If a cluster manager, pks.clusters.manage, is attempting to delete a network profile, the following error occurs:

You do not have enough privileges to perform this action. Please contact the PKS administrator.

List Network Profiles

To list your network profiles, run the following command:

pks network-profiles

For example:

$ pks network-profiles

    Name                Description 
    lb-profile-medium   Network profile for medium size NSX-T load balancer
    small-routable-pod  Network profile with small load balancer and two routable pod networks

Create a Cluster with a Network Profile

To create a PKS-provisioned Kubernetes cluster with a network profile, run the following command:

pks create-cluster CLUSTER-NAME --external-hostname HOSTNAME --plan PLAN-NAME --network-profile NETWORK-PROFILE-NAME

Where:

  • CLUSTER-NAME is a unique name for your cluster.
  • HOSTNAME is your external hostname used for accessing the Kubernetes API.
  • PLAN-NAME is the name of the PKS plan you want to use for your cluster.
  • NETWORK-PROFILE-NAME is the name of the network profile you want to use for your cluster.

Note: You must create the network profile before you create the cluster.

View Cluster Details

To view detailed information about your cluster, run the following command:

pks cluster CLUSTER-NAME

Where CLUSTER-NAME is the name of your cluster. See the example output of this command below:

Name:                       k8s1
Plan Name:                  Plan 1
UUID:                       6125f251-1a2e-4903-9192-efc21b27ec20
Last Action:                CREATE
Last Action State:          succeeded
Last Action Description:    Instance provisioning completed
Kubernetes Master Host:     k8s1
Kubernetes Master Port:     8443
Worker Nodes:               1
Kubernetes Master IP(s):    192.168.150.104
Network Profile Name:       lb-profile-medium

Please send any feedback you have to pks-feedback@pivotal.io.

Create a pull request or raise an issue on the source for this page in GitHub