Set–ClusterConfig - anongitmous/k8sShell GitHub Wiki
Load cluster configuration settings into the current PowerShell session.
[-ClusterKey] <String>
[-PersistedConfig <String>]
[-PassThru]
[<CommonParameters>]
Load cluster configuration settings into the current PowerShell session, optionally loading a new persisted configuration file as well.
When a new ClusterKey is specified, the console title is updated with the key value.
In this way, it's easy to see which console is configured for a given cluster.
See the example output.
ℹ️ See A Note about the Examples
1. Load the cluster configuration for the 'qa1' cluster
- To see the updated values, add the
-PassThruswitch parameter.- Using aliasing, the above can be shortened to
ksscc qa1
2. Load the persisted configuration file config.json and the cluster configuration for the 'production 4' cluster
- To see the updated values, add the
-PassThruswitch parameter.- Using aliasing, the above can be shortened to
ksscc prod4 -PersistedConfig config.json
-ClusterKey
- The key used to locate the target cluster configuration.
| Type: | <String> |
| Aliases: | |
| Position: | 0 |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
-PersistedConfig
- The file that contains per-cluster configurations and other runtime values.
- The values will be loaded into memory and utilized by the K8sShell API to control runtime functionality such as the current kube config, kube context, default namespace, port-forwarding mappings, cmdlet directives, etc.
- See the example config.json.
| Type: | <String> |
| Aliases: | |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
-PassThru
- Switch parameter that controls whether the newly-loaded values are output to the console.
| Type: | SwitchParameter |
| Aliases: | |
| Position: | Named |
| Default value: | False |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Mtf.Kubernetes.Config.RuntimeConfiguration

K8sShell includes the following alias for Set-ClusterConfig:
- ksscc