k3s/examples/cephfs
Rohith 395e83c549 - updating the cephfs example, most people, myself include skip the readme and jump to the code
- add the path attribute to the example
2016-03-12 16:51:32 +00:00
..
secret implement Ceph FS volume plugin and add to e2e volume test 2015-09-01 14:05:17 -04:00
README.md Update the latestReleaseBranch to release-1.2 in the munger. 2016-03-08 18:59:28 -08:00
cephfs-with-secret.yaml Update cephfs example according to config best practices 2015-09-28 20:03:06 +08:00
cephfs.yaml - updating the cephfs example, most people, myself include skip the readme and jump to the code 2016-03-12 16:51:32 +00:00

README.md

WARNING WARNING WARNING WARNING WARNING

PLEASE NOTE: This document applies to the HEAD of the source tree

If you are using a released version of Kubernetes, you should refer to the docs that go with that version.

The latest release of this document can be found [here](http://releases.k8s.io/release-1.2/examples/cephfs/README.md).

Documentation for other releases can be found at releases.k8s.io.

How to Use it?

Install Ceph on the Kubernetes host. For example, on Fedora 21

# yum -y install ceph

If you don't have a Ceph cluster, you can set up a containerized Ceph cluster

Then get the keyring from the Ceph cluster and copy it to /etc/ceph/keyring.

Once you have installed Ceph and a Kubernetes cluster, you can create a pod based on my examples cephfs.yaml and cephfs-with-secret.yaml. In the pod yaml, you need to provide the following information.

  • monitors: Array of Ceph monitors.
  • path: Used as the mounted root, rather than the full Ceph tree. If not provided, default / is used.
  • user: The RADOS user name. If not provided, default admin is used.
  • secretFile: The path to the keyring file. If not provided, default /etc/ceph/user.secret is used.
  • secretRef: Reference to Ceph authentication secrets. If provided, secret overrides secretFile.
  • readOnly: Whether the filesystem is used as readOnly.

Here are the commands:

    # kubectl create -f examples/cephfs/cephfs.yaml

    # create a secret if you want to use Ceph secret instead of secret file
    # kubectl create -f examples/cephfs/secret/ceph-secret.yaml
	
    # kubectl create -f examples/cephfs/cephfs-with-secret.yaml
    # kubectl get pods

If you ssh to that machine, you can run docker ps to see the actual pod and docker inspect to see the volumes used by the container.

Analytics