title: Docker login into kube cluster
body: <p>I've create a private repo on docker hub and trying to pull that image into my kubernetes cluster. I can see the documentations suggest to do this</p>
  
  <p><code>
  kubectl create secret generic regcred \
      --from-file=.dockerconfigjson=&lt;path/to/.docker/config.json&gt; \
      --type=kubernetes.io/dockerconfigjson
  </code></p>
  
  <p>I am already logged in, and i change path to ~/.docker/config.json but it keeps giving me </p>
  
  <p><code>error: error reading ~./docker/config.json: no such file or directory</code> </p>
  
  <p>despite the fact if i type <code>cat ~/.docker/config.json</code> it displays the content, meaning there is a file.</p>
  
  <p>So in other words how to properly authenticate and be able to push private images into kube cluster?</p>