ancient-wolf-19325
08/08/2024, 4:57 PMimagePullSecrets: Add the secret to the service account or use a custom pod template.
Create a Kubernetes Secret
First, create a Kubernetes secret with your GCR credentials:
kubectl create secret docker-registry gcr-secret \
--docker-server=https://gcr.io \
--docker-username=_json_key \
--docker-password="$(cat path/to/your-gcr-key.json)" \
--docker-email=your-email@example.com
Configure imagePullSecrets
You can configure imagePullSecrets in two ways:
Service Account
1. Edit the default service account in the Flyte namespace to include the `imagePullSecrets`:
kubectl patch serviceaccount default -p '{"imagePullSecrets": [{"name": "gcr-secret"}]}' -n flyte
Custom Pod Template
1. Create a custom pod template that includes the `imagePullSecrets`:
apiVersion: v1
kind: Pod
metadata:
name: private-reg
spec:
containers:
- name: private-reg-container
image: gcr.io/your-project/your-image:tag
imagePullSecrets:
- name: gcr-secret
2. Update FlytePropeller to use this custom pod template.
For more details, refer to the Flyte documentation on private images.
Would you like more detail on any of these steps?
Sources:
- Flyte documentation on private images
- Kubernetes documentation on pulling images from a private registry
Slack Link
https://flyte-org.slack.com/archives/CP2HDHKE1/p1723136236.917939 👍 0 button 👎 0 button 💡 Hint: Mention @runllm in the thread for followups.