Skip to content

Commit 475bd34

Browse files
instruction on using private apps in k8s
1 parent 3e649bd commit 475bd34

File tree

1 file changed

+47
-0
lines changed

1 file changed

+47
-0
lines changed

docs/configuration.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -467,6 +467,53 @@ SHUFFLE_SWARM_CONFIG=run
467467
SHUFFLE_MEMCACHED=shuffle-memcached:11211 # this depends on your setup.
468468
```
469469

470+
### Private apps on Kubernetes
471+
To run private apps on Kubernetes, you need a private container registry to pull images from. Once you configure `REGISTRY_URL` to point to your private registry, Shuffle will automatically pull app images from there.
472+
473+
To install the Shuffle Helm chart pointing to your custom registry, run:
474+
```bash
475+
helm install shuffle oci://ghcr.io/shuffle/charts/shuffle \
476+
--namespace shuffle \
477+
--create-namespace \
478+
--set env[0].name=REGISTRY_URL \
479+
--set env[0].value="YOURIP:5000"
480+
```
481+
482+
If your registry allows unauthenticated pushes (or you're not using Docker Hub), you can skip this step.
483+
However, if your private registry requires authentication, create and share a Docker registry secret using:
484+
```bash
485+
kubectl create secret docker-registry <your_secret_name> \
486+
--docker-server=<registry-url> \
487+
--docker-username=<user> \
488+
--docker-password=<pass> \
489+
--docker-email=<email> \
490+
-n shuffle
491+
492+
kubectl set env deployment/backend SHUFFLE_REGISTRY_SECRET="<your_secret_name>" -n shuffle
493+
```
494+
495+
After switching to your private registry, the images for already-installed apps will not be available in the new registry. To avoid image-pull failures, you can mirror all existing Shuffle app images from Docker Hub into your private registry.
496+
497+
You can use `skopeo` to mirror the entire repository (docker.io/frikky/shuffle) or run the following script to pull and push every tag manually:
498+
```bash
499+
registry="your-registry.domain:5000"
500+
501+
page=1
502+
while true; do
503+
tags=$(curl -s "https://hub.docker.com/v2/repositories/frikky/shuffle/tags?page=$page&page_size=100" | jq -r '.results[].name')
504+
[ -z "$tags" ] && break
505+
506+
for tag in $tags; do
507+
echo "-> $tag"
508+
docker pull frikky/shuffle:$tag
509+
docker tag frikky/shuffle:$tag $registry/shuffle:$tag
510+
docker push $registry/shuffle:$tag
511+
done
512+
513+
page=$((page+1))
514+
done
515+
```
516+
470517
## Networking
471518
Networking with Shuffle is pretty straight forward. What we check for are the following:
472519

0 commit comments

Comments
 (0)