mount nfs

This commit is contained in:
w-mj 2023-03-11 16:22:01 +08:00
parent 45b0d2f388
commit 326f33a954
No known key found for this signature in database
GPG Key ID: 3A2CB5BE2F835897
3 changed files with 57 additions and 9 deletions

View File

@ -33,6 +33,14 @@ spec:
value: "!bd832W0@CG" value: "!bd832W0@CG"
- name: ASE_KEY - name: ASE_KEY
value: A5es$&!0GeoEast value: A5es$&!0GeoEast
volumeMounts:
- name: persistent-storage
mountPath: /nfs
volumes:
- name: persistent-storage
nfs:
server: 192.168.252.250
path: /mnt/CGdata/ms
--- ---
apiVersion: v1 apiVersion: v1
kind: Service kind: Service

View File

@ -17,6 +17,7 @@ type AppModel struct {
Env string Env string
SvcName string SvcName string
Ports string Ports string
PersistentPath string
} }
func (*AppModel) TableName() string { func (*AppModel) TableName() string {

39
test/jupyter.yaml Normal file
View File

@ -0,0 +1,39 @@
apiVersion: v1
kind: Service
metadata:
name: jupyter
labels:
app: jupyter
spec:
ports:
- port: 30000
name: http
targetPort: 8888
nodePort: 30000
selector:
app: jupyter
type: LoadBalancer
---
apiVersion: v1
kind: Pod
metadata:
name: jupyter
labels:
app: jupyter
spec:
containers:
- name: jupyter
image: jupyter/minimal-notebook:lab-3.6.1
command: ["bash", "-c", "source /etc/bash.bashrc && jupyter lab --ip 0.0.0.0 --port 8888 --no-browser --allow-root --NotebookApp.token=''"]
ports:
- containerPort: 8888
protocol: TCP
name: http
volumeMounts:
- name: persistent-storage
mountPath: /this/is/nfs
volumes:
- name: persistent-storage
nfs:
server: 192.168.252.250
path: /mnt/CGdata/ms/test_dir