`docker run k8s.gcr.io/kustomize/kustomize:v3.8.7 version`
## Database
You will need a postgres database. I have not included the postgres docker container that immich uses by default. You will probably
want to run database for many services. I recommend [Crunchydata postgres operator](https://access.crunchydata.com/documentation/postgres-operator/v5/quickstart/).
Once it is deployed then you need to [add a user](https://access.crunchydata.com/documentation/postgres-operator/5.3.0/architecture/user-management/). This will create a K8s secret for that user which you can refer to in the example-env.yaml.
```yaml
- name: BASE_DB_URL
valueFrom:
secretKeyRef:
key: uri
name: example-db-pguser-immich-user
```
## Redis
You will also need a redis database. For something similar to the database operator above you could use [spotahomes operator](https://github.com/spotahome/redis-operator). I just needed a single redis pod so I went for the [bitnami redis chart](https://github.com/bitnami/charts/tree/main/bitnami/redis/#installing-the-chart).
# Install/Deployment
Copy the example overlays folder so you can customise to your liking. I have provided examples of changing the most common things,
but you can change most parts via kustomize.
As of 26th Jan 2023 you will need to use the latest image tag to get [pull request](https://github.com/immich-app/immich/pull/1256).
## Via kubectl
Build the templates to see what they look like without applying.
`kubectl kustomize overlays/custom`
Deploy to the cluster.
`kubectl apply -k overlays/custom`
## Via docker kustomize
Build the templates to see what they look like without applying.
`docker run -v absolute_path_to_checkout:/k8s k8s.gcr.io/kustomize/kustomize:v3.8.7 build /k8s/k8s-immich/overlays/custom`