Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/kubernetes/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
我可以使用flocker制作kubernetes卷吗?_Kubernetes - Fatal编程技术网

我可以使用flocker制作kubernetes卷吗?

我可以使用flocker制作kubernetes卷吗?,kubernetes,Kubernetes,Kubernetes批量支持flocker?如果支持flocker volume,请举例说明如何使用flocker volume?谢谢 Kubernetes 1.1版支持Flocker。Flocker数据集可以从PersistentVolume引用,也可以直接从Pod卷引用 Kubernetes 1.1版支持Flocker。Flocker数据集可以从PersistentVolume引用,也可以直接从Pod卷引用 请确保您的kubernetes组件为V1.1版,并仔细检查您的Kubernete

Kubernetes批量支持flocker?如果支持flocker volume,请举例说明如何使用flocker volume?谢谢

Kubernetes 1.1版支持Flocker。Flocker数据集可以从PersistentVolume引用,也可以直接从Pod卷引用


Kubernetes 1.1版支持Flocker。Flocker数据集可以从PersistentVolume引用,也可以直接从Pod卷引用


请确保您的kubernetes组件为V1.1版,并仔细检查您的Kubernete

下面是一个使用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
您需要通过flocker命令行工具提前创建卷

$flockerctl create -m name=myuniqueflockerdatasetname -s 10G --node=583b0093
--node是在运行时收到的flocker分配的节点id(下面的示例)-s是大小

$ flockerctl list-nodes
SERVER     ADDRESS
583b0093   10.0.0.109
170606f4   10.0.0.108

请确保您的kubernetes组件为V1.1,并仔细检查您的Kubernete

下面是一个使用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
您需要通过flocker命令行工具提前创建卷

$flockerctl create -m name=myuniqueflockerdatasetname -s 10G --node=583b0093
--node是在运行时收到的flocker分配的节点id(下面的示例)-s是大小

$ flockerctl list-nodes
SERVER     ADDRESS
583b0093   10.0.0.109
170606f4   10.0.0.108

definitions.html v1.Volume结构不包括flocker,因此kubernetes不能将flocker用于Volume?definitions.html v1.Volume结构不包括flocker,因此kubernetes不能将flocker用于Volume?