Updated on 2025-04-03 GMT+08:00

ccictl config set-context

Scenario

Set a context entry in cliconfig.

Specifying a name that already exists will merge new fields on top of existing values for those fields.

ccictl config set-context [NAME | --current] [--cluster=cluster_nickname] [--user=user_nickname] [--namespace=namespace]

Examples

# Set the user field in the gce context entry without affecting other values.
ccictl config set-context gce --user=cluster-admin

Options

--cluster string

Cluster for the context entry in cliconfig.

--current

Modify the current context.

-h, --help

Help information for set-context

--namespace string

Namespace for the context entry in cliconfig.

--user string

User for the context entry in cliconfig.

The following ccictl options can also be used in subcommands:

Parent command options