Copying files to pod using kubectl
-----
controlplane ~ ➜ kubectl get pods
NAME READY STATUS RESTARTS AGE
nginx 1/1 Running 0 39s
-----
controlplane ~ ➜ kubectl exec -it nginx /bin/bash
kubectl exec [POD] [COMMAND] is DEPRECATED and will be removed in a future version. Use kubectl exec [POD] -- [COMMAND] instead.
----
root@nginx:/# ls
bin dev docker-entrypoint.sh home lib32 libx32 mnt proc run srv tmp var
boot docker-entrypoint.d etc lib lib64 media opt root sbin sys usr
----
root@nginx:/# mkdir raj
root@nginx:/# ls
bin dev docker-entrypoint.sh home lib32 libx32 mnt proc root sbin sys usr
boot docker-entrypoint.d etc lib lib64 media opt raj run srv tmp var
----
root@nginx:/# cd raj/
root@nginx:/raj# pwd
/raj
root@nginx:/raj# exit
exit
----
controlplane ~ ➜ ls
sample.yaml
----
controlplane ~ ➜ kubectl cp sample.yaml nginx:/raj
----
controlplane ~ ➜ kubectl exec -it nginx /bin/bash
kubectl exec [POD] [COMMAND] is DEPRECATED and will be removed in a future version. Use kubectl exec [POD] -- [COMMAND] instead.
----
root@nginx:/# cd raj/
root@nginx:/raj# ls
sample.yaml
----