Copying Files and Directories to and from Containers
With the help of the “kubectl cp” command, we can copy files from host to container and vice versa.
The basic syntax of “kubectl cp”
kubectl cp <host path pod name:container path>
This command will only function if the “tar” command in the container images is present or the command failed to run.
Kubernetes – Kubectl Commands
Pre-requisites: Kubernetes
The Kubernetes command-line tool, kubectl, allows you to run commands against Kubernetes clusters. You can use kubectl to deploy applications, inspect and manage cluster resources, and view logs. Some basic Kubectl commands in a Kubernetes cluster are as follows: