kubectl cp: data lost?

1/2/2019

My file locally:

ls -al spark-streaming-1.0-SNAPSHOT-jar-with-dependencies.jar
-rw-r--r--  1 me  110502799  137448102 Jan  2 16:59 spark-streaming-1.0-SNAPSHOT-jar-with-dependencies.jar

I used kubectl cp to copy this file to centOS pod in k8s, but I got

# ls -al examples/jars/spark-streaming-1.0-SNAPSHOT-jar-with-dependencies.jar
-rw------- 1 root root 110690304 Jan  2 22:15 examples/jars/spark-streaming-1.0-SNAPSHOT-jar-with-dependencies.jar

but 137448102 != 110690304. Any data lost?

Thanks

UPDATE

I did another kubectl cp, and put more details below:

On MAC:

me$ ls -al target/spark-streaming-1.0-SNAPSHOT-jar-with-dependencies.jar
-rw-r--r--  1 me  110502799  137448102 Jan  2 17:24 target/spark-streaming-1.0-SNAPSHOT-jar-with-dependencies.jar
me$ md5 target/spark-streaming-1.0-SNAPSHOT-jar-with-dependencies.jar
MD5 (target/spark-streaming-1.0-SNAPSHOT-jar-with-dependencies.jar) = ff6ae687b19c97871e65db6e4ea6002f

on CentOS POD of k8s:

root@myspark-master-5d6656bd84-79745:/usr/spark-2.3.1# ls -al examples/jars/spark-streaming-1.0-SNAPSHOT-jar-with-dependencies.jar
-rw------- 1 root root 132054528 Jan  2 22:47 examples/jars/spark-streaming-1.0-SNAPSHOT-jar-with-dependencies.jar
root@myspark-master-5d6656bd84-79745:/usr/spark-2.3.1# md5sum examples/jars/spark-streaming-1.0-SNAPSHOT-jar-with-dependencies.jar
edc4ddc8f011e5b8e79741e15ac1ac1d  examples/jars/spark-streaming-1.0-SNAPSHOT-jar-with-dependencies.jar
-- BAE
centos
kubectl
kubernetes
kubernetes-pod

0 Answers