Check out example codes for "how to login to docker inside kubernetes cluster". It will help you in understanding the concepts better.

Code Example 1

kubectl create secret docker-registry regcred --docker-server=<your-registry-server> --docker-username=<your-name> --docker-password=<your-pword> --docker-email=<your-email>

Learn ReactJs, React Native from akashmittal.com