[Proxmox] Setup proxmox cluster and join node

It is easy to find many material on how to setup cluster, but sometime it will have variance issues when join cluster.

Lesson learnt from previous work, I will conclude them into steps and hope it can help others.Prerequisites

  1. Ensure all Proxmox nodes are same version.
    It can done by run commands in each node below:

    ## Update package list.
    sudo apt update
    
    ## Ensure all proxmox node in same version.
    sudo apt dist-upgrade -y 
    
    ## Update package.
    sudo apt upgrade
    
    ## Clean up
    sudo apt clean
  2. Ensure all node connect to network;
  3. Ensure all node can resolve each other’s DNS record;

In there, it will use 2 nodes (nodeA, nodeB) in command as sample/

Steps:

  1. Create cluster.
    In nodeA, use command below to create cluster.

    pvecm create demo-cluster
  2. Grand cluster firewall port.
    In nodeA, open /etc/pve/firewall/cluster.fw , add rules inside section [RULES], sample as below:

    [RULES]
    
    IN SSH(ACCEPT) -i vmbr0 -log nolog # SSH between nodes
    IN NTP(ACCEPT) -i vmbr0 -log nolog # NTP sync time
    IN DNS(ACCEPT) -i vmbr0 -log nolog # DNS resolve
    IN ACCEPT -i vmbr0 -p tcp -dport 5403 -sport 5403 -log nolog # Proxmox VE Cluster Daemon
    IN ACCEPT -i vmbr0 -p tcp -dport 60050 -sport 60000 -log nolog # Proxmox VE backup and migration traffic
    IN ACCEPT -i vmbr0 -p udp -dport 5405 -sport 5404 -log nolog # Proxmox corosync
    IN ACCEPT -i vmbr0 -p tcp -dport 3128 -sport 3128 -log nolog # Proxmox VE HA (High Availability) manager
    IN ACCEPT -i vmbr0 -p tcp -dport 5999 -sport 5900 -log nolog # SPICE console connections.
    IN ACCEPT -i vmbr0 -p tcp -dport 8009 -sport 8007 -log nolog # Proxmox VE cluster traffic
    IN ACCEPT -i vmbr0 -p tcp -dport 8006 -sport 8006 -log nolog # Proxmox VM
  3. Join node.
    In nodeB, use command below to join cluster.

    pvecm add <node1 IP address>
  4. Verify result
    In nodeB, run command below, if it can found nodeB IP address, means node join successfully.

    pvecm status

About C.H. Ling 262 Articles
a .net / Java developer from Hong Kong and currently located in United Kingdom. Thanks for Google because it solve many technical problems so I build this blog as return. Besides coding and trying advance technology, hiking and traveling is other favorite to me, so I will write down something what I see and what I feel during it. Happy reading!!!

Be the first to comment

Leave a Reply

Your email address will not be published.


*


This site uses Akismet to reduce spam. Learn how your comment data is processed.