Ipv4 Only Clients

Working with IPv4 only clients

Some clients might only support IPv4. To ensure that these clients can communicate with the cluster you might want to look into renting a VPS with a static IPv4 address and configure it as a TCP proxy for your Kubernetes services. You can do this by setting an A wildcard record pointing to your VPS IP in your DNS provider and then on your VPS, you can install and configure haproxy as follows:

  1. Ensure you have an A wildcard record pointing to your VPS IP in your DNS provider.
  2. Install haproxy on your VPS:
    sudo apt-get update && \
    sudo apt install haproxy -y
  3. Add this to your /etc/haproxy/haproxy.cfg file:
    global
        log /dev/log local0
        maxconn 2000
        daemon
    
    defaults
        log     global
        mode    tcp
        timeout connect 5s
        timeout client  1m
        timeout server  1m
    
    resolvers dns
        nameserver dns1 2001:4860:4860::8888:53
        resolve_retries 3
        timeout retry 1s
        hold valid 30s
    
    frontend https_in
        bind 0.0.0.0:443
        default_backend home_ipv6_tls
        option tcplog
    
    backend home_ipv6_tls
        server home1 auth.<domain>:443 resolvers dns resolve-prefer ipv6
    
    frontend ssh_in
        bind 0.0.0.0:22
        default_backend home_ipv6_ssh
        option tcplog
    
    backend home_ipv6_ssh
        server home1 gitea.<domain>:22 resolvers dns resolve-prefer ipv6
    Note that you need to replace <domain> with your actual domain.
  4. Save the file and restart HAProxy.
    sudo systemctl enable --now haproxy && \
    sudo systemctl restart haproxy