Create a Single Node Cluster

Command: cluster bootstrap

The pf9ctl cluster bootstrap command is used to create a simple single node cluster on the given physical or virtual machine on which the CLI is being run.

The command does the following:

  • installs all the required pre-requisites on the node on which it’s running
  • installs Platform9 host agent and other required software on the node
  • authorizes the node to be associated with the PMK management plane
  • creates the cluster and attaches the node to the cluster, configuring the node to be both a master and a worker

Usage

Usage:

pf9ctl cluster bootstrap [OPTIONS] CLUSTER_NAME

The command-line flags are all optional. The list of available flags are:

  • --masterVip TEXT - IP address for VIP for master nodes. Required if you are creating a multi-master cluster. For more information about VIP, read BareOS multi-master architecture

  • --masterVipIf TEXT - Name of the network interface on this node on which the VIP should bind to. Required if you are creating a multi-master cluster. For a single master cluster, VIP is optional. Make sure that the virtual IP specified above is accessible on this network interface, and that all master nodes use the same interface name for the interface to be associated with the virtual IP

  • --metallbCidr TEXT - IP range for MetalLB (specified in ‘Start IP - End IP’ range format). You should specify this value if you would like to use MetalLB as an option for service load balancing. For more information about MetalLB, read Service load balancing with MetalLB

  • --containersCidr TEXT - Defaults to 10.20.0.0/16. The CIDR for containers running on your cluster. (Specified in CIDR format. Example - 192.0.2.0/24). Kubernetes uses this CIDR to route packets between pods or containers in the cluster. You should specify an unused subnet here. And this subnet should be treated as Kubernetes internal subnet. Make sure that your network equipment does not route or otherwise is aware of this subnet.

  • --servicesCidr TEXT - Defaults to 10.21.0.0/16. The CIDR for services running on your cluster. (Specified in CIDR format. Example - 192.0.2.0/24). Kubernetes uses this CIDR to route packets between the services in the cluster. You should specify an unused subnet here. And this subnet should be treated as Kubernetes internal subnet. Make sure that your network equipment does not route or otherwise is aware of this subnet.

  • --externalDnsName TEXT - External DNS name for master VIP. (Specified in FQDN format. Example myhostname.mydomainname.com) If you specify this, it means you have associated this DNS name to the IP address you specified for the --masterVip parameter. This DNS name will be used for the cluster API server endpoint. This DNS name will be appear for the ‘server’ property for when users download kubeconfig for this cluster. It will also appear under the column ‘API endpoint’ in the PMK UI Clusters grid view. (If no DNS name is specified, the ‘server’ property in kubeconfig and the ‘API endpoint’ column in the Clusters grid view will simply reference the IP of the cluster)

  • --privileged BOOLEAN - Defaults to True. Specify if the cluster should be enabled to run privileged containers. Note that being able to run privileged containers within the cluster is a prerequisite if you wish to enable service type loadbalancer using MetalLB. By default a container is not allowed to access any devices on the host, but a “privileged” container is given access to all devices on the host. For more information, see Priviledged Policy Reference

  • --appCatalogEnabled BOOLEAN - Defaults to False. Enable Helm application catalog for the cluster

  • --networkPlugin TEXT - Defaults to flannel. The network plugin you’d like to create the cluster with. Accepted options - calico and flannel. By default, the cluster will be created with flannel as the network plugin.

  • --help- Show this message and exit.

Example

This sample command creates a simple single node cluster using the current node as a master + worker node.

pf9ctl cluster bootstrap MyTestCluster

Troubleshooting

See CLI Troubleshooting