text stringlengths 0 59.1k |
|---|
- 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 must match the volume name below |
- name: ghost-data |
mountPath: "/var/lib/ghost" |
volumes: |
- name: ghost-data |
flocker: |
datasetName: my-flocker-vol |
<|endoftext|> |
# source: k8s_examples/_archived/volumes/flocker/flocker-pod.yml type: yaml |
apiVersion: v1 |
kind: Pod |
metadata: |
name: flocker-web |
spec: |
containers: |
- name: web |
image: nginx |
ports: |
- name: web |
containerPort: 80 |
volumeMounts: |
# name must match the volume name below |
- name: www-root |
mountPath: "/usr/share/nginx/html" |
volumes: |
- name: www-root |
flocker: |
datasetName: my-flocker-vol |
<|endoftext|> |
# source: k8s_examples/_archived/volumes/flocker/README.md type: docs |
## Using Flocker volumes |
[Flocker](https://clusterhq.com/flocker) is an open-source clustered container data volume manager. It provides management |
and orchestration of data volumes backed by a variety of storage backends. |
This example provides information about how to set-up a Flocker installation and configure it in Kubernetes, as well as how to use the plugin to use Flocker datasets as volumes in Kubernetes. |
### Prerequisites |
A Flocker cluster is required to use Flocker with Kubernetes. A Flocker cluster comprises: |
- *Flocker Control Service*: provides a REST over HTTP API to modify the desired configuration of the cluster; |
- *Flocker Dataset Agent(s)*: a convergence agent that modifies the cluster state to match the desired configuration; |
- *Flocker Container Agent(s)*: a convergence agent that modifies the cluster state to match the desired configuration (unused in this configuration but still required in the cluster). |
The Flocker cluster can be installed on the same nodes you are using for Kubernetes. For instance, you can install the Flocker Control Service on the same node as Kubernetes Master and Flocker Dataset/Container Agents on every Kubernetes Replica node. |
It is recommended to follow [Installing Flocker](https://docs.clusterhq.com/en/latest/install/index.html) and the instructions below to set-up the Flocker cluster to be used with Kubernetes. |
#### Flocker Control Service |
The Flocker Control Service should be installed manually on a host. In the future, this may be deployed in pod(s) and exposed as a Kubernetes service. |
#### Flocker Agent(s) |
The Flocker Agents should be manually installed on *all* Kubernetes nodes. These agents are responsible for (de)attachment and (un)mounting and are therefore services that should be run with appropriate privileges on these hosts. |
In order for the plugin to connect to Flocker (via REST API), several environment variables must be specified on *all* Kubernetes nodes. This may be specified in an init script for the node's Kubelet service, for example, you could store the below environment variables in a file called `/etc/flocker/env` and place `Env... |
The environment variables that need to be set are: |
- `FLOCKER_CONTROL_SERVICE_HOST` should refer to the hostname of the Control Service |
- `FLOCKER_CONTROL_SERVICE_PORT` should refer to the port of the Control Service (the API service defaults to 4523 but this must still be specified) |
The following environment variables should refer to keys and certificates on the host that are specific to that host. |
- `FLOCKER_CONTROL_SERVICE_CA_FILE` should refer to the full path to the cluster certificate file |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.