Proxmox Ceph - Connect external workloads to proxmox Ceph

Discussion in 'Proxmox VE: Networking and Firewall' started by breakaway9000, Sep 13, 2018.

  1. breakaway9000

    breakaway9000 Member

    Dec 20, 2015
    Likes Received:

    I’ve got a 3 node proxmox cluster running ceph.

    I’m also running Kubernetes on top of proxmox.

    Currently, my LAN is and my Ceph network is (separated over a different NIC and VLAN)

    How do I give my Kubernetes access to Ceph? I want to create a separate pool and use object storage.

    I guess I have to start with adding a virtual NIC for each Kube node into the network so ther can communicate with the Proxmox Ceph Mons - am I on the right track here or is there a better way to do this?
  2. breakaway9000

    breakaway9000 Member

    Dec 20, 2015
    Likes Received:
    Turns out that is not the right way to do it. The right way is to update the config so that the OSDs are running on network (dedicated 10gbps) and put the monitors/managers on your (or whatever) network.

    In the below scenario, I am setting up a "Public" network for my ceph in the subnet (with the monitor IPs changing from to

    Below is a quick-n-nasty way to do this. Note that this requires cluster downtime.

    First, export the ceph monitor map to a file ("MONMAP_FILE" in this case).

    ceph mon getmap -o MONMAP_FILE
    Now, check what's inside it.

    monmaptool --print MONMAP_FILE
    Now, delete the old hosts & add the new hosts with the correct IP.

    monmaptool --rm proxmox-node01 --rm proxmox-node02 --rm proxmox-node03
    monmaptool --add proxmox-node01 --add proxmox-node02 --add proxmox-node03 MONMAP_FILE
    Check everything - make sure you got your IPs & hostnames correct.

    Then, move the file to /etc/pve - corosync will now put it on all your hosts. You don't have to do it this way but I found it to be the easiest way to shift stuff between nodes quickly.

    mv MONMAP_FILE /etc/pve
    Now connect to your proxmox hosts, stop all VMs & CTs. Then, navigate to "ceph" and then to "Monitors", then stop all monitors. Now its time to inject the new monmap file into each host.

    Run this command on each host - modify as needed of course

    ceph-mon -i <hostname> --inject-monmap /path/to/MONMAP_FILE
    For eg, I ran the following 3 commands

    ceph-mon -i proxmox-node01 --inject-monmap /etc/pve/MONMAP_FILE
    ceph-mon -i proxmox-node02 --inject-monmap /etc/pve/MONMAP_FILE
    ceph-mon -i proxmox-node03 --inject-monmap /etc/pve/MONMAP_FILE
    Once that's done, you need to edit /etc/pve/ceph.conf to include your new IP addressing. I have posted my FULL ceph.conf for reference.

             auth client required = none
             auth cluster required = none
             auth service required = none
             fsid = sdf-287b-46ff-a302-sdfasdf
             keyring = /etc/pve/priv/$cluster.$name.keyring
             mon allow pool delete = true
             osd journal size = 5120
             osd pool default min size = 2
             osd pool default size = 3
             public network =
             cluster network =
             keyring = /var/lib/ceph/osd/ceph-$id/keyring
             host = proxmox-node01
             mon addr =
             host = proxmox-node02
             mon addr =
             host = proxmox-node03
             mon addr =
    At this point, you're supposed to be able to restart the monitors and then the OSDs one by one and everything should just work (TM) but I couldn't get this working. I rebooted all 3 of my hosts - everything now functioning as normal.

    I'd appreciate if anyone can chime in on why it doesn't work without a reboot.

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice