keys secrets because they solve a different problem:
- a project
keyssecret is a runtime application credential - an image pull secret is registry authentication used before the container starts
Before you start
These examples assume:- the MeshAgent CLI is installed
- you have already authenticated with
meshagent setup - you have an active project selected
Create an image pull secret
Pick the command that matches your registry:bash
Reference it from a service
Create a file likeprivate-image-demo.yaml:
registry.example.com/my-team/private-app:latestwith your real private imagesecret-abcdef123with the secret ID returned when you created the pull secret- add whatever
commandyour private image needs, if it does not already have the correct entrypoint
container.pull_secret is checked before the container starts. MeshAgent uses it to authenticate to the registry, pull the image, and then start the container.
Deploy the service
bash
container.pull_secret, then deploy the service.
Best practices
- Use image pull secrets only for private registry access.
- Do not treat an image pull secret as an application runtime secret.
- Keep registry credentials separate from the credentials your application uses after startup.