Skip to content
phluit.comGo to portal

How do I pull images in Kubernetes or push from CI?

Last verified 30 Nov 2026

Create a Kubernetes pull secret for your Phluit container registry with a read-only token, and push images from GitHub Actions or any CI with a read/write token.

Use a read-only token for clusters and servers, and a read/write token for your CI. Create them on the registry’s Access tokens tab. See How do I create and manage access tokens?

Create the secret with a read-only token:

kubectl create secret docker-registry phluit-registry \
--docker-server=cr.phluit.net \
--docker-username='robot$<your-registry>+<token-name>' \
--docker-password='<your-token>'

Then use it in your pod spec, and point the container’s image at cr.phluit.net/<your-registry>/<image>:<tag>:

imagePullSecrets:
- name: phluit-registry

Create the secret in each namespace that pulls from the registry.

In your repository, add two secrets: PHLUIT_REGISTRY_USER (the token’s user name) and PHLUIT_REGISTRY_TOKEN (the token). Then add these steps to your workflow:

- uses: docker/login-action@v3
with:
registry: cr.phluit.net
username: ${{ secrets.PHLUIT_REGISTRY_USER }}
password: ${{ secrets.PHLUIT_REGISTRY_TOKEN }}
- run: docker build -t cr.phluit.net/<your-registry>/my-app:${{ github.sha }} . && docker push cr.phluit.net/<your-registry>/my-app:${{ github.sha }}

Your registry’s Overview tab shows the same steps with your address under GitHub Actions.

Keep the user name and token as protected CI variables, then:

echo "$PHLUIT_TOKEN" | docker login cr.phluit.net -u "$PHLUIT_USER" --password-stdin
docker build -t cr.phluit.net/<your-registry>/app:$COMMIT .
docker push cr.phluit.net/<your-registry>/app:$COMMIT

On a Phluit cloud server, log in with a read-only token and pull or run the image:

docker login cr.phluit.net -u 'robot$<your-registry>+<token-name>' --password-stdin < token.txt
docker run -d cr.phluit.net/<your-registry>/app:1.0
  • Tag images with the commit or a version number, not only latest, so you know what runs where.
  • A token with an expiry date stops working on that date. Create the new token and update your secrets before then.
  • Old tags take space. See How do I see scan results and delete old images?

Was this helpful?