Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

lhns/docker-swarm-keepalived

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

docker-swarm-keepalived

Build Workflow Docker Stars Docker Pulls Docker Image Size Apache License 2.0

Operator for keepalived on docker swarm.

Uses osixia/docker-keepalived.

Usage

  • Enable the "ip_vs" kernel module if not enabled
lsmod | grep -P '^ip_vs\s' || (echo "modprobe ip_vs" >> /etc/modules && modprobe ip_vs)
  • Set a different priority for each node
docker node update node1 --label-add KEEPALIVED_PRIORITY=100
docker node update node2 --label-add KEEPALIVED_PRIORITY=101
docker node update node3 --label-add KEEPALIVED_PRIORITY=102
  • Deploy the stack

Docker images

https://github.com/lhns/docker-swarm-keepalived/pkgs/container/keepalived-swarm

Docker Stack

version: '3.8'

services:
  keepalived:
    image: ghcr.io/lhns/keepalived-swarm
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
    networks:
      - host
    deploy:
      mode: global
      placement:
        constraints: [node.role == manager]
    environment:
      KEEPALIVED_VIRTUAL_IPS: "192.168.1.231, 192.168.1.232"

networks:
  host:
    external: true
    name: host

Helpful Links

License

This project uses the Apache 2.0 License. See the file called LICENSE.

Packages

 
 
 

Contributors 2

  •  
  •  
Morty Proxy This is a proxified and sanitized view of the page, visit original site.