Skip to content

Instantly share code, notes, and snippets.

@mikemadisonweb
Created January 17, 2018 06:34
Show Gist options
  • Save mikemadisonweb/2dcf37e3e20577aa09c6125e2fa03669 to your computer and use it in GitHub Desktop.
Save mikemadisonweb/2dcf37e3e20577aa09c6125e2fa03669 to your computer and use it in GitHub Desktop.
Resolve inconsistency with the most recent kubernetes and docker versions (may not be needed in future)
kubectl create secret -n "$KUBE_NAMESPACE" \
docker-registry gitlab-registry \
--docker-server="$CI_REGISTRY" \
--docker-username="$CI_REGISTRY_USER" \
--docker-password="$CI_REGISTRY_PASSWORD" \
--docker-email="$GITLAB_USER_EMAIL" \
-o yaml --dry-run | sed 's/dockercfg/dockerconfigjson/g' | kubectl replace -n "$KUBE_NAMESPACE" --force -f -
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment