git clone后按tutorial進(jìn)行
關(guān)于apiversion: kubectl api-versions 查看
關(guān)于 yaml文件之Volume - HostPath
關(guān)于yaml文件之通過shell執(zhí)行命令
command: ["/bin/sh"]
args: ["-c", "if [ -f 'test' ]; then echo ok; else echo no; fi"]
spec:
? containers:
? - image: k8s.gcr.io/test-webserver
? ? name: test-container
? ? volumeMounts:
? ? - mountPath: /test-pd
? ? ? name: test-volume
? volumes:
? - name: test-volume
? ? hostPath:
? ? ? # directory location on host
? ? ? path: /data
? ? ? # this field is optional
? ? ? type: Directory