Bootstrap
Create a Single Node Cluster
Command: cluster bootstrap
The pf9ctl cluster bootstrapcommand 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
Note: For the bootstrap command, only the cluster name is mandatory. The CLI assumes reasonable defaults for all the other options. Note that it creates a single master cluster only.
Usage
Usage:
pf9ctl cluster bootstrap [OPTIONS] CLUSTER_NAMEThe command-line flags are all optional. The list of available flags are:
| Flag | Type | Description |
|---|---|---|
--masterVip | String | 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 | String | 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 | String | 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 MetalLB Application Load Balancing for BareOS. |
--containersCidr | String | 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 | String | 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 | 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 load balancer 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 Privileged Policy Reference. |
--appCatalogEnabled | Boolean | Defaults to False. Enable Helm application catalog for the cluster. |
--networkPlugin | String | 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. |
Note: If you are using the CLI with Platform9 Managed Kubernetes Free Tier, note that the Free Tier currently does not support enabling Helm application catalog as a feature. This parameter will be treated as a no-op when specified in the context of a free tier cluster.
Example
This sample command creates a simple single node cluster using the current node as a master + worker node.
pf9ctl cluster bootstrap MyTestClusterTroubleshooting
Refer to Troubleshooting CLI Issues.