-
Story
-
Resolution: Done
-
Major
-
None
-
False
-
False
-
ToDo
-
-
Sprint 212+213
As a user of crane, I may have many contexts stored in my $KUBECONFIG and those contexts may not necessarily be constrained to a particular namespace already. I want to be able to export resources from a specific namespace from one of my clusters (that may not be my current context).
Currently, the crane tool says this about context and namespace:
--context string The kube context, if empty it will use the current context. If --namespace is set it will take precedence
-n, --namespace string The kube namespace to export.
An example scenario would be one like the kubeconfig below:
apiVersion: v1
clusters:
- cluster:
certificate-authority-data: DATA+OMITTED
server: https://127.0.0.1:38103
name: kind-dest
- cluster:
certificate-authority-data: DATA+OMITTED
server: https://127.0.0.1:36921
name: kind-src
contexts:
- context:
cluster: kind-dest
user: kind-dest
name: kind-dest
- context:
cluster: kind-src
user: kind-src
name: kind-src
current-context: kind-dest
kind: Config
preferences: {}
users:
- name: kind-dest
user:
client-certificate-data: REDACTED
client-key-data: REDACTED
- name: kind-src
user:
client-certificate-data: REDACTED
client-key-data: REDACTED
And I want to export resources from the 'guestbook' namespace of the 'kind-src' cluster. I should be able to do so with:
/crane export \
--namespace=guestbook \
--export-dir=${EXPORT_DIR} \
--context=kind-src
- relates to
-
MIG-936 Pipeline + Crane POC
- Closed
- links to