reg.mini.dev
. An active token is required to pull images from the Minimus registry. With an active token, you can pull any of the Minimus images included in your subscription (or available without a subscription).
A token is a type of secret so, like with all secrets, you should ensure that the token isn’t stored where it can be leaked.
Docker environment
Insert token inline (on-demand authentication)
Insert your Minimus token directly in thedocker pull
/ docker run
command to login to the Minimus registry on demand. The token isn’t persisted in Docker’s credential store. This approach works well for ad-hoc testing.
When you copy the pull command from the gallery, it will contain an inline token.
docker login
command (persistent authentication)
Authenticate to the Minimus registry using the docker login command to keep your session active until the token expires. This way you will not need to use an inline token.
docker login
again with an active token to continue working. A valid inline token will not work since docker login
takes priority.
You can run
docker logout reg.mini.dev
to reset your access if you prefer to work with an inline token.Using a credential store
You have the option to use a credential store for additional security. Learn more from DockerKubernetes environment
Create Kubernetes Secret (K8s Secret)
To avoid embedding tokens in Kubernetes files or Helm charts, we can reference a Kubernetes Secret. The Kubernetes Secret must be created in the same namespace as the deployment. Run the following to create a Kubernetes Secret of typedocker-registry
. Once created, you can reference this Secret to let Kubernetes pull images from the Minimus registry automatically. Throughout the Minimus documentation, we assume the K8s Secret is named minimus-registry
.
Create Kubernetes Secret using an encoded file
After logging in using thedocker login
steps above, we can create an encoded config.json
file locally with the value necessary to generate the Kubernetes Secret.
-
Login to
reg.mini.dev
using the steps above. -
Execute
cat ~/.docker/config.json | base64 -w 0
to base64 encode the credentials. -
Create a Kubernetes YAML file named
minimus-registry.yaml
.minimus-registry.yaml -
Create the K8s Secret in the application namespace:
-
Add the
ImagePullSecret
parameter to your deployment by changing the spec as shown in the snippet below and redeploy:
Helm charts
Insert token inline (on-demand)
You can insert the token directly in thehelm install
command. The token can either be inserted as part of the registry, or image, depending on the structure of the Helm chart. See the following examples.
Reference Kubernetes Secret on-demand
Assuming your Kubernetes secret is namedminimus-registry
as in the above example, you can add the following flag to your Helm install/upgrade commands:
--set=global.imagePullSecrets[0].name=minimus-registry
.
values.yaml
.
Add imagePullSecrets
to values.yaml
You can edit the values.yaml
file to override the values in the chart. To deploy Minimus images to a Kubernetes cluster, add the ImagePullSecrets
parameter to point to the minimus-registry
K8s Secret:
example of values.yaml
Supported images
The images you have permissions to pull depend on the images included in your subscription. Learn moreTroubleshooting
Valid inline token returned unauthorized error
To fix the problem: Rundocker logout reg.mini.dev
to reset your access and try the pull command again.
Explanation: Most likely, you previously authenticated with the docker login
command and the token has since expired or been deleted. The token from the docker login
command takes precedence over the inline token and this is causing the error.