github.com/qsunny/k8s@v0.0.0-20220101153623-e6dca256d5bf/examples-master/staging/volumes/flocker/flocker-pod-with-rc.yml (about) 1 apiVersion: v1 2 kind: Service 3 metadata: 4 name: flocker-ghost 5 labels: 6 app: flocker-ghost 7 spec: 8 ports: 9 # the port that this service should serve on 10 - port: 80 11 targetPort: 80 12 selector: 13 app: flocker-ghost 14 --- 15 apiVersion: v1 16 kind: ReplicationController 17 metadata: 18 name: flocker-ghost 19 # these labels can be applied automatically 20 # from the labels in the pod template if not set 21 labels: 22 purpose: demo 23 spec: 24 replicas: 1 25 template: 26 metadata: 27 labels: 28 app: flocker-ghost 29 spec: 30 containers: 31 - name: flocker-ghost 32 image: ghost:0.7.1 33 env: 34 - name: GET_HOSTS_FROM 35 value: dns 36 ports: 37 - containerPort: 2368 38 hostPort: 80 39 protocol: TCP 40 volumeMounts: 41 # name must match the volume name below 42 - name: ghost-data 43 mountPath: "/var/lib/ghost" 44 volumes: 45 - name: ghost-data 46 flocker: 47 datasetName: my-flocker-vol