Our service is hosted within the image-service namespace on Kubernetes. Typically, you’ll be in your personal test namespace identified by your fedid. Switch to the image-service namespace using:
kubectl config set-context --current --namespace=image-serviceEnsure that all necessary YAML files are correctly applied. Start by deploying the sealed secret containing the NAS S3 credentials:
kubectl apply -f k8s/sealedthumbor-secret.yamlIf issues arise with the sealed secret, create and seal a new one by following the guidelines available in the Secrets Guide
Next, set up the persistent volume to store the image cache:
kubectl apply -f k8s/pv-pvc.yamlThen, deploy the service and deployment configurations:
kubectl apply -f k8s/service.yaml
kubectl apply -f k8s/deployment.yamlThis deployment uses images from the Google Cloud Registry. Ensure you have the necessary permissions and settings configured as specified in the Container Registry guide.
Finally, apply the ingress to make the service accessible externally:
kubectl apply -f k8s/ingress.yamlThere are two cron jobs: one purges the cache and the other manages storage deletion from the NAS S3 Bucket. These can be triggered through the Kubernetes dashboard, and the schedule configured through the respective YAML.
To deploy the Expired Image Deleter please apply the following yaml:
kubectl apply -f k8s/delete-expired.yamlTo view the cache, first find your pod:
kubectl get podsThen, access the pod's shell:
kubectl exec -it <pod_name> -- /bin/bashFind the cache directory:
find /data/thumbor/storageTo manage cache purging, clone the CronCachePurger repository and apply the relevant YAML:
git clone https://github.com/LambdaLightSource/CronCachePurger
kubectl apply -f cronjob.yaml