config context add cli command
elastic config context add <name> [options]
Add a new context to the config file
<name>stringrequired- context name
--[no-]force- overwrite an existing context with the same name
--[no-]inline-secrets- store secrets inline in the config file (instead of the OS keychain)
--es-urlstring- Elasticsearch URL
--es-usernamestring- Elasticsearch username (pair with --es-password)
--kb-urlstring- Kibana URL
--kb-usernamestring- Kibana username (pair with --kb-password)
--cloud-urlstring- Elastic Cloud API URL
--es-api-keystring- Elasticsearch API key (secret -- stored in the OS keychain when available)
--es-passwordstring- Elasticsearch password (secret -- stored in the OS keychain when available)
--kb-api-keystring- Kibana API key (secret -- stored in the OS keychain when available)
--kb-passwordstring- Kibana password (secret -- stored in the OS keychain when available)
--cloud-api-keystring- Elastic Cloud API key (secret -- stored in the OS keychain when available)
--config-filestring- path to the config file to edit (defaults to ~/.elasticrc.yml)
--[no-]dry-run- validate all inputs and exit without performing any action (preview changes without applying them)
--[no-]json-
output as JSON