Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: added kubectl cp commands #173

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions specs/kubernetes/copy_from_local_to_pod.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
name: Copy files or directories from local to container.
command: >
kubectl cp {{local_file_path}} {{namespace}}/{{pod}}:{{pod_file_path}}
tags:
- kubernetes
description: 'Copy file or directories from local filesystem to a container.'
arguments:
- name: local_file_path
description: Source path of the file or directory in local filesystem.
default_value: ~

- name: namespace
description: Namespace the pod resides in.
default_value: default

- name: pod
description: Name of pod.
default_value: ~

- name: pod_file_path
description: Destination path of the file or directory in the container.
default_value: ~

source_url: "https://kubernetes.io/docs/reference/kubectl/generated/kubectl_cp/"
author: Abdullahxz
author_url: "https://github.com/Abdullahxz"
shells: []
28 changes: 28 additions & 0 deletions specs/kubernetes/copy_from_pod_to_local.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
name: Copy files or directories from containers to local.
command: >
kubectl cp {{namespace}}/{{pod}}:{{pod_file_path}} {{local_file_path}}
tags:
- kubernetes
description: 'Copy file or directories from a container to local filesystem.'
arguments:
- name: namespace
description: Namespace the pod resides in.
default_value: default

- name: pod
description: Name of pod.
default_value: ~

- name: pod_file_path
description: Source path of the file or directory in the container.
default_value: ~

- name: local_file_path
description: Destination path of the file or directory in local filesystem.
default_value: ~

source_url: "https://kubernetes.io/docs/reference/kubectl/generated/kubectl_cp/"
author: Abdullahxz
author_url: "https://github.com/Abdullahxz"
shells: []