label test
This commit is contained in:
parent
3f94def624
commit
b748f26fff
|
|
@ -20,10 +20,12 @@ spec:
|
||||||
selector:
|
selector:
|
||||||
matchLabels:
|
matchLabels:
|
||||||
app: tf-notebook
|
app: tf-notebook
|
||||||
|
user: user
|
||||||
template:
|
template:
|
||||||
metadata:
|
metadata:
|
||||||
labels:
|
labels:
|
||||||
app: tf-notebook
|
app: tf-notebook
|
||||||
|
user: user
|
||||||
spec:
|
spec:
|
||||||
nodeSelector:
|
nodeSelector:
|
||||||
nodegroup: gpu
|
nodegroup: gpu
|
||||||
|
|
@ -52,6 +54,7 @@ metadata:
|
||||||
name: tf-notebook
|
name: tf-notebook
|
||||||
labels:
|
labels:
|
||||||
app: tf-notebook
|
app: tf-notebook
|
||||||
|
user: user
|
||||||
spec:
|
spec:
|
||||||
type: ClusterIP
|
type: ClusterIP
|
||||||
ports:
|
ports:
|
||||||
|
|
@ -60,3 +63,4 @@ spec:
|
||||||
targetPort: 8888
|
targetPort: 8888
|
||||||
selector:
|
selector:
|
||||||
app: tf-notebook
|
app: tf-notebook
|
||||||
|
user: user
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,54 @@
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: tf-notebook
|
||||||
|
spec:
|
||||||
|
replicas: 2
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: tf-notebook
|
||||||
|
user: user1
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: tf-notebook
|
||||||
|
user: user1
|
||||||
|
spec:
|
||||||
|
nodeSelector:
|
||||||
|
nodegroup: gpu
|
||||||
|
containers:
|
||||||
|
- name: tf-notebook
|
||||||
|
image: tensorflow/tensorflow:2.16.2-gpu-jupyter
|
||||||
|
resources:
|
||||||
|
limits:
|
||||||
|
cpu: "4"
|
||||||
|
memory: 16Gi
|
||||||
|
nvidia.com/gpu: 2
|
||||||
|
ports:
|
||||||
|
- containerPort: 8888
|
||||||
|
name: notebook
|
||||||
|
volumeMounts:
|
||||||
|
- name: notebook-storage
|
||||||
|
mountPath: /sample
|
||||||
|
volumes:
|
||||||
|
- name: notebook-storage
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: tf-notebook-pvc
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: tf-notebook
|
||||||
|
labels:
|
||||||
|
app: tf-notebook
|
||||||
|
user: user1
|
||||||
|
spec:
|
||||||
|
type: ClusterIP
|
||||||
|
ports:
|
||||||
|
- port: 80
|
||||||
|
name: http
|
||||||
|
targetPort: 8888
|
||||||
|
selector:
|
||||||
|
app: tf-notebook
|
||||||
|
user: user1
|
||||||
|
|
||||||
|
|
@ -1,46 +0,0 @@
|
||||||
apiVersion: v1
|
|
||||||
kind: PersistentVolumeClaim
|
|
||||||
metadata:
|
|
||||||
name: a1-tf-notebook-pvc
|
|
||||||
namespace: org2
|
|
||||||
spec:
|
|
||||||
accessModes:
|
|
||||||
- ReadWriteOnce
|
|
||||||
resources:
|
|
||||||
requests:
|
|
||||||
storage: 10Gi
|
|
||||||
storageClassName: nfs-client
|
|
||||||
---
|
|
||||||
apiVersion: apps/v1
|
|
||||||
kind: Deployment
|
|
||||||
metadata:
|
|
||||||
name: a1-tf-notebook
|
|
||||||
namespace: org2
|
|
||||||
spec:
|
|
||||||
replicas: 1
|
|
||||||
selector:
|
|
||||||
matchLabels:
|
|
||||||
app: tf-notebook
|
|
||||||
template:
|
|
||||||
metadata:
|
|
||||||
labels:
|
|
||||||
app: tf-notebook
|
|
||||||
spec:
|
|
||||||
containers:
|
|
||||||
- image: tensorflow/tensorflow:2.16.2-gpu-jupyter
|
|
||||||
name: tf-notebook
|
|
||||||
ports:
|
|
||||||
- containerPort: 8888
|
|
||||||
name: notebook
|
|
||||||
resources:
|
|
||||||
limits:
|
|
||||||
nvidia.com/gpu: 1
|
|
||||||
volumeMounts:
|
|
||||||
- mountPath: /sample
|
|
||||||
name: notebook-storage
|
|
||||||
nodeSelector:
|
|
||||||
nodegroup: gpu
|
|
||||||
volumes:
|
|
||||||
- name: notebook-storage
|
|
||||||
persistentVolumeClaim:
|
|
||||||
claimName: a1-tf-notebook-pvc
|
|
||||||
Loading…
Reference in New Issue