Using Cluster Loader
Procedure
To pull the container image, run:
Prerequisites
Procedure
Execute Cluster Loader using the built-in test configuration, which deploys five template builds and waits for them to complete:
Alternatively, execute Cluster Loader with a user-defined configuration by setting the environment variable for :
In this example,
${LOCAL_KUBECONFIG}
refers to the path to thekubeconfig
on your local file system. Also, there is a directory called${LOCAL_CONFIG_FILE_PATH}
, which is mounted into the container that contains a configuration file calledtest.yaml
. Additionally, if thetest.yaml
references any external template files or podspec files, they should also be mounted into the container.
The tool creates multiple namespaces (projects), which contain multiple templates or pods.
Cluster Loader’s configuration file is a basic YAML file:
1 | Optional setting for end-to-end tests. Set to local to avoid extra log messages. |
2 | The tuning sets allow rate limiting and stepping, the ability to create several batches of pods while pausing in between sets. Cluster Loader monitors completion of the previous step before continuing. |
3 | Stepping will pause for M seconds after each N objects are created. |
4 | Rate limiting will wait M milliseconds between the creation of objects. |
This example assumes that references to any external template files or pod spec files are also mounted into the container.
If you are running Cluster Loader on Microsoft Azure, then you must set the |
Configuration fields
Field | Description |
---|---|
| An integer. One definition of the count of how many projects to create. |
| A string. One definition of the base name for the project. The count of identical namespaces will be appended to |
| |
| A string containing either or |
| A list of key-value pairs. The key is the config map name and the value is a path to a file from which you create the config map. |
| A list of key-value pairs. The key is the secret name and the value is a path to a file from which you create the secret. |
| A sub-object with one or many definition(s) of pods to deploy. |
| A sub-object with one or many definition(s) of templates to deploy. |
Field | Description |
---|---|
| An integer. The number of pods or templates to deploy. |
| A string. The docker image URL to a repository where it can be pulled. |
| A string. One definition of the base name for the template (or pod) that you want to create. |
| A string. The path to a local file, which is either a pod spec or template to be created. |
| Key-value pairs. Under |
Field | Description |
---|---|
| A sub-object. A stepping configuration used if you want to create an object in a step creation pattern. |
| A sub-object. A rate-limiting tuning set configuration to limit the object creation rate. |
Field | Description |
---|---|
| An integer. How many objects to create before pausing object creation. |
| An integer. How many seconds to pause after creating the number of objects defined in |
| An integer. How many seconds to wait before failure if the object creation is not successful. |
| An integer. How many milliseconds (ms) to wait between creation requests. |
Cluster Loader fails when called without configuration. ()
If the
IDENTIFIER
parameter is not defined in user templates, template creation fails witherror: unknown parameter name "IDENTIFIER"
. If you deploy templates, add this parameter to your template to avoid this error:If you deploy pods, adding the parameter is unnecessary.