2024-03-08 11:59:39 +08:00
|
|
|
|
# 文件共享服务:Samba
|
2024-03-08 10:14:18 +08:00
|
|
|
|
|
|
|
|
|
## 为什么需要 Samba 服务?
|
|
|
|
|
|
|
|
|
|
家里有些设备,比如电视机,支持通过 Samba 远程读取文件来看路由器磁盘中的视频文件,前提是路由器安装了 Samba 服务。
|
|
|
|
|
|
|
|
|
|
## 开源项目
|
|
|
|
|
|
2024-03-08 10:32:36 +08:00
|
|
|
|
本文部署的 Samba 服务使用这个开源项目构建的容器镜像:https://github.com/dperson/samba
|
2024-03-08 10:14:18 +08:00
|
|
|
|
|
|
|
|
|
## 目录结构
|
|
|
|
|
|
|
|
|
|
```txt
|
|
|
|
|
samba
|
|
|
|
|
├── daemonset.yaml
|
|
|
|
|
└── kustomization.yaml
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
## 准备 daemonset.yaml
|
|
|
|
|
|
|
|
|
|
<FileBlock showLineNumbers title="daemonset.yaml" file="home-network/samba.yaml" />
|
|
|
|
|
|
|
|
|
|
## 准备 kustomization.yaml
|
|
|
|
|
|
2024-03-08 17:39:46 +08:00
|
|
|
|
```yaml title="kustomization.yaml"
|
2024-03-08 10:14:18 +08:00
|
|
|
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
|
|
|
|
kind: Kustomization
|
|
|
|
|
|
|
|
|
|
resources:
|
|
|
|
|
- daemonset.yaml
|
|
|
|
|
|
|
|
|
|
namespace: default
|
|
|
|
|
```
|