From d0a0804fbfcade7893c5c215ea4b2fea830efbd3 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Wed, 30 Jul 2025 14:37:40 +0300 Subject: update --- f3s/registry/README.md | 22 ++++++++++------------ f3s/registry/pv.yaml | 5 ++++- f3s/registry/pvc.yaml | 2 +- f3s/registry/service.yaml | 1 + 4 files changed, 16 insertions(+), 14 deletions(-) diff --git a/f3s/registry/README.md b/f3s/registry/README.md index a5f6a16..3049532 100644 --- a/f3s/registry/README.md +++ b/f3s/registry/README.md @@ -14,26 +14,24 @@ This document describes how to push Docker images to the private registry deploy 0. **Create the registry directory in the NFS share** -1. **Get the NodePort of the registry service:** +1. **Tag your Docker image:** - ```bash - kubectl get svc docker-registry-service -o jsonpath='{.spec.ports[0].nodePort}' - ``` - -2. **Tag your Docker image:** - - Replace `` with the name of your local Docker image and `` with the IP address of any node in your Kubernetes cluster and `` with the port obtained in the previous step. + Replace `` with the name of your local Docker image and `` with the IP address of any node in your Kubernetes cluster. The registry is available on NodePort `30001`. ```bash - docker tag :/ + docker tag :30001/ ``` -3. **Push the image to the registry:** +2. **Push the image to the registry:** ```bash - docker push :/ + docker push :30001/ ``` -4. **Pull the image from the registry (from a Kubernetes pod):** +3. **Pull the image from the registry (from a Kubernetes pod):** You can now use the image in your Kubernetes deployments by referencing it as `docker-registry-service:5000/`. + +## Communication + +The Docker registry is exposed via a static NodePort (`30001`) and uses plain HTTP. It is not configured for TLS. diff --git a/f3s/registry/pv.yaml b/f3s/registry/pv.yaml index 74a6583..fb747ca 100644 --- a/f3s/registry/pv.yaml +++ b/f3s/registry/pv.yaml @@ -5,7 +5,10 @@ metadata: spec: capacity: storage: 5Gi + volumeMode: Filesystem accessModes: - ReadWriteOnce + persistentVolumeReclaimPolicy: Retain hostPath: - path: "/data/nfs/k3svolumes/registry" + path: /data/nfs/k3svolumes/registry + type: Directory diff --git a/f3s/registry/pvc.yaml b/f3s/registry/pvc.yaml index 192013c..e769c89 100644 --- a/f3s/registry/pvc.yaml +++ b/f3s/registry/pvc.yaml @@ -4,9 +4,9 @@ metadata: name: docker-registry-pvc namespace: infra spec: + storageClassName: "" accessModes: - ReadWriteOnce resources: requests: storage: 5Gi - storageClassName: local-storage diff --git a/f3s/registry/service.yaml b/f3s/registry/service.yaml index 35c6fac..a97f14e 100644 --- a/f3s/registry/service.yaml +++ b/f3s/registry/service.yaml @@ -10,4 +10,5 @@ spec: - protocol: TCP port: 5000 targetPort: 5000 + nodePort: 30001 type: NodePort -- cgit v1.2.3