-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathreadme.md.backup
44 lines (28 loc) · 893 Bytes
/
readme.md.backup
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# FastAPI Upload files to NFS in Kubernetes
## Install NFS
dnf install nfs-utils
systemctl enable --now nfs-server
## Configura NFS
mkdir /opt/{share,vol01,vol02}
[root@centos8 ~]# cat /etc/exports
/opt/share 192.168.123.0/24(rw,sync)
/opt/vol01 192.168.123.0/24(rw,sync)
/opt/vol02 192.168.123.0/24(rw,sync)
## Ativa NFS
exportfs -ra
exportfs -v
exportfs -s
## Libera firewall
firewall-cmd --new-zone=nfs --permanent
firewall-cmd --zone=nfs --add-service=nfs --permanent
firewall-cmd --zone=nfs --add-source=192.168.123.0/24 --permanent
firewall-cmd --reload
# Comandos
## Build
buildah bud --layers=true -t uploads:latest .
## Run
mkdir {uploads,upload}
podman run -it --rm --name uploads \
-v ${PWD}/upload:/upload \
-v ${PWD}/uploads:/uploads \
-p8000:8000 uploads:latest