Export a context to a tar or kubeconfig file
docker context export [OPTIONS] CONTEXT [FILE|-]
Name, shorthand | Default | Description |
--kubeconfig | Export as a kubeconfig file |
Command | Description |
---|---|
docker context | Manage contexts |
Command | Description |
docker context create | Create a context |
docker context export | Export a context to a tar or kubeconfig file |
docker context import | Import a context from a tar or zip file |
docker context inspect | Display detailed information on one or more contexts |
docker context ls | List contexts |
docker context rm | Remove one or more contexts |
docker context update | Update a context |
docker context use | Set the current docker context |
Exports a context in a file that can then be used with docker context import
(or with kubectl
if --kubeconfig
is set). Default output filename is <CONTEXT>.dockercontext
, or <CONTEXT>.kubeconfig
if --kubeconfig
is set. To export to STDOUT
, you can run docker context export my-context -
.
© 2019 Docker, Inc.
Licensed under the Apache License, Version 2.0.
Docker and the Docker logo are trademarks or registered trademarks of Docker, Inc. in the United States and/or other countries.
Docker, Inc. and other parties may also have trademark rights in other terms used herein.
https://docs.docker.com/engine/reference/commandline/context_export/