pvc

apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: projector-sre
  namespace: sre
spec:
  accessModes:
  - ReadWriteOnce
  resources:
    requests:
      storage: "1000Gi"
  volumeName: 
  storageClassName: nfs

Deployment

apiVersion: apps/v1
kind: Deployment
metadata:
  name: projector-sre
  namespace: sre
spec:
  replicas: 1
  selector:
    matchLabels:
      projector: sre
  template:
    metadata:
      labels:
        projector: sre
    spec:
      containers:
      - name: projector
        image: registry.jetbrains.team/p/prj/containers/projector-idea-u
        imagePullPolicy: IfNotPresent
        ports:
        - containerPort: 8887               
          name: projector-port
          protocol: TCP
        volumeMounts:                    
        - name: projector-home
          mountPath: /home/projector-user
      volumes:
      - name: projector-home
        persistentVolumeClaim:
          claimName: projector-sre   

svc

apiVersion: v1
kind: Service
metadata:
  name: projector-sre
  namespace: sre
  labels:
    projector: sre
spec:
  selector:
    projector: sre
  type: NodePort
  ports:
  - name: projector-port
    port: 8887
    targetPort: 8887
    nodePort: 30084

发表评论

您的电子邮箱地址不会被公开。 必填项已用*标注

Captcha Code