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).

About Network Profiles

Network profiles enable you to specify NSX-T configuration parameters at the time of cluster creation.

For example, you can customize the size of the load balancer that is deployed when a Kubernetes cluster is created using PKS. See Load Balancers in PKS Deployments on vSphere with NSX‑T for more information.

Required Permissions

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

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

Define a Network Profile

Before you can create a network profile, you must define your network profile configuration in a JSON file as follows:

Parameter Description
name User-defined name for the network profile
description User-defined description for the network profile
parameters One or more name-value pairs
lb_size Size of the load balancer deployed with the Kubernetes cluster:
small, medium, or large

For example:

{
 "name": "lb-profile-medium",
 "description": "Network profile for MEDIUM size NSX-T load balancer",
 "parameters": { 
    "lb_size": "medium" 
    }
}

To create a network profile, follow the instructions in Create a Network Profile.

Create and Use Network Profiles

You can create and use network profiles through the PKS CLI. The PKS CLI supports the following operations for network profiles:

Create a Network Profile

After you define your network profile as described in Define a Network Profile, 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 in Define a Network Profile.

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

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: The network profile must exist.

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