Skip to content

Instantly share code, notes, and snippets.

@mrjamiebowman
Last active February 23, 2021 01:44
Show Gist options
  • Save mrjamiebowman/247297484080fdc72443c249cb7f2ef0 to your computer and use it in GitHub Desktop.
Save mrjamiebowman/247297484080fdc72443c249cb7f2ef0 to your computer and use it in GitHub Desktop.
Kubernetes Generate Docker Secret with PowerShell
$registry = "docker.io"
$username = "mrjamiebowman"
$password = Read-Host "Enter a Password" -MaskInput
kubectl create secret docker-registry dockercred --docker-server=$registry --docker-username=$username --docker-password=$password -o jsonpath="{.data.\.dockerconfigjson}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment