Kubernetes卷支持flocker?如果支持絮凝剂体积,请举一个使用絮凝剂体积的例子。谢谢!
发布于 2015-11-17 02:33:35
Kubernetes版本1.1支持Flocker。可以从PersistentVolume或直接从Pod卷引用絮凝器数据集。
http://kubernetes.io/v1.1/examples/flocker/ http://kubernetes.io/v1.1/docs/api-reference/v1/definitions.html#_v1_persistentvolume
发布于 2016-01-14 02:03:57
请确保您的kubernetes组件是1.1版,请仔细检查您的kubelet!
下面是一个使用Flocker集成的pod/rc规范示例
apiVersion: v1
kind: Service
metadata:
name: flocker-ghost
labels:
app: flocker-ghost
spec:
ports:
# the port that this service should serve on
- port: 80
targetPort: 80
selector:
app: flocker-ghost
---
apiVersion: v1
kind: ReplicationController
metadata:
name: flocker-ghost
# these labels can be applied automatically
# from the labels in the pod template if not set
labels:
purpose: demo
spec:
replicas: 1
template:
metadata:
labels:
app: flocker-ghost
spec:
containers:
- name: flocker-ghost
image: ghost:0.7.1
env:
- name: GET_HOSTS_FROM
value: dns
ports:
- containerPort: 2368
hostPort: 80
protocol: TCP
volumeMounts:
- name: ghost-data
mountPath: "/var/lib/ghost"
volumes:
- name: ghost-data
flocker:
datasetName: myuniqueflockerdatasetname您需要通过絮凝器命令行工具提前创建体积。
$flockerctl create -m name=myuniqueflockerdatasetname -s 10G --node=583b0093--node是絮凝器分配的节点id,您在运行时会收到(示例如下) -s is size
$ flockerctl list-nodes
SERVER ADDRESS
583b0093 10.0.0.109
170606f4 10.0.0.108https://stackoverflow.com/questions/33685253
复制相似问题