This commit is contained in:
2024-02-19 10:43:40 +01:00
parent 37dee0bd87
commit 729bc11f8d
2 changed files with 9 additions and 34 deletions
+8 -33
View File
@@ -30,7 +30,7 @@ The above command will store registry.crt and registry.key in a TLS secret calle
apiVersion: v1
kind: Namespace
metadata:
name: distribution-sc
name: distribution
```
```yaml
@@ -38,7 +38,7 @@ metadata:
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: distribution
name: distribution-sc
provisioner: nfs.csi.k8s.io
parameters:
server: 192.168.202.50
@@ -64,35 +64,10 @@ spec:
resources:
requests:
storage: 100Gi
storageClassName: distribution
storageClassName: distribution-sc
```
```yaml
# patch_nfs_details.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: nfs-client-provisioner
name: nfs-distribution-provisioner
spec:
template:
spec:
containers:
- name: nfs-distribution-provisioner
env:
- name: NFS_SERVER
value: 192.168.202.50
- name: NFS_PATH
value: /srv/distribution/
volumes:
- name: nfs-distribution-root
nfs:
server: 192.168.202.50
path: /srv/distribution/
```
Create Namespace.yaml, StorageClass.yaml, PersistantVolumeClaim.yaml and patch_nfs_details.yaml with the above content.
Create Namespace.yaml, StorageClass.yaml and PersistantVolumeClaim.yaml with the above content.
### Deployment of registry container
```yaml
@@ -167,17 +142,17 @@ spec:
### Deployment
```yaml
# kustomizastion.yaml
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: distribution-sc
bases:
- github.com/kubernetes-sigs/nfs-subdir-external-provisioner//deploy
resources:
- Namespace.yaml
- StorageClass.yaml
- PersistantVolumeClaim.yaml
- RegistryDeployment.yaml
- Service.yaml
patchesStrategicMerge:
- patch_nfs_details.yaml
```
Create above files kustomization.yaml and start the deployment:
```bash
+1 -1
View File
@@ -1,7 +1,7 @@
# kustomizastion.yaml
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: distribution-sc
namespace: distribution
resources:
- Namespace.yaml