In the Quick start, you provisioned a Konvoy cluster with default configuration settings. Customizing the cluster is an optional task, but one of the most common tasks you perform when deploying in a production environment.
If you are configuring the Konvoy cluster for a production deployment, you can use this tutorial to learn the basic steps involved in provisioning a custom cluster. However, provisioning a production cluster typically involves more planning and custom configuration than covered in this brief example.
This tutorial demonstrates how you can customize a few simple configuration settings for your Konvoy cluster, then provision the cluster using a public cloud infrastructure. The steps are similar if you are provisioning the cluster using an internal network (on-prem) infrastructure.
To provision a customized cluster on Amazon Web Services (AWS):
-
Generate the configuration files by running the following command:
konvoy init --provisioner=awsTo provision the cluster with FIPS enabled, use the command:
konvoy init --mode fips -
Edit the provisioner configuration settings in the
cluster.yamlcluster configuration file.You can edit the cluster configuration settings to suit your needs. For example, you can change the node count or add custom tags to all resources created by the installer by modifying the corresponding settings in the
cluster.yamlfile under theClusterProvisionersection.The following example illustrates the
ClusterProvisionersettings defined in thecluster.yamlcluster configuration file:kind: ClusterProvisioner apiVersion: konvoy.mesosphere.io/v1beta2 metadata: name: konvoy creationTimestamp: "2019-05-31T18:00:01.482791-04:00" spec: provider: aws providerOptions: region: us-west-2 availabilityZones: - us-west-2c tags: owner: hector nodePools: - name: node count: 4 machine: rootVolumeSize: 80 rootVolumeType: gp2 imagefsVolumeEnabled: true imagefsVolumeType: gp2 imagefsVolumeSize: 160 imagefsVolumeDevice: xvdb type: m5.2xlarge - name: control-plane controlPlane: true count: 3 machine: rootVolumeSize: 80 rootVolumeType: gp2 imagefsVolumeEnabled: true imagefsVolumeType: gp2 imagefsVolumeSize: 160 imagefsVolumeDevice: xvdb type: m5.xlarge sshCredentials: user: centos publicKeyFile: konvoy-ssh.pub privateKeyFile: konvoy-ssh.pem version: v0.0.15-10-g57dff48As illustrated in this example, you can modify the
nodePoolssection to configure the nodes of your cluster by changing thenodePools.countfrom4to5or the node type by changing thenodePools.machine.typefromm5.2xlargetom5.xlarge.You can also modify the
tagssection to extend the lifetime of your cluster. This change might be useful, for example, if your AWS administrator has created a job to remove cloud resources based on AWS resource tags. For example:### needs both tags tags: owner: luxi expiration: 24hFor more information about customizing provisioning settings, see Cluster configuration.
-
Edit the
ClusterConfigurationsection ofcluster.yamlconfiguration file to change which addons you want to enable or disable.The following example illustrates the
ClusterConfigurationsettings defined in thecluster.yamlcluster configuration file:kind: ClusterConfiguration apiVersion: konvoy.mesosphere.io/v1beta2 metadata: name: konvoy creationTimestamp: "2019-05-31T18:00:00.844964-04:00" spec: kubernetes: version: 1.20.13 networking: podSubnet: 192.168.0.0/16 serviceSubnet: 10.0.0.0/18 cloudProvider: provider: aws podSecurityPolicy: enabled: false containerRuntime: containerd: version: 1.2.5 addons: configVersion: v0.0.11 addonList: - name: velero enabled: true - name: helm enabled: true - name: awsebsprovisioner enabled: false - name: awsebscsiprovisioner enabled: true - name: opsportal enabled: true - name: elasticsearch enabled: true - name: fluentbit enabled: true - name: kibana enabled: true - name: prometheus enabled: true - name: traefik enabled: true - name: dashboard enabled: true version: v0.0.15-10-g57dff48In this example, you can disable the
fluentbitaddon by changing theenabledfield fromtruetofalse.NOTE: The addons
helmandopsportalare required and a cluster cannot be provisioned until they are enabled.For more information about customizing cluster configuration settings, see Cluster configuration.
-
Provision the cluster with your customized settings by running the following command:
konvoy up
The konvoy up command provisions the cluster similar to how it is provisioned using the default settings as described in the Quick start.
However, customized provisioning creates a cluster.tmp.yaml file that contains the default values merged with your user-provided overrides.
The cluster.tmp.yaml file is the file that Ansible uses during its execution.
You can delete this file after the cluster is created because it is regenerated every time you execute the konvoy up command.
Konvoy Documentation