# Implementing Hitless Reloads within HAproxy in K8S

**URL:** <https://discourse.haproxy.org/t/implementing-hitless-reloads-within-haproxy-in-k8s/4568>\
**Category:** Help!\
**Created:** [November 27, 2019, 6:23pm UTC](https://discourse.haproxy.org/t/implementing-hitless-reloads-within-haproxy-in-k8s/4568 "2019-11-27T18:23:28Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![guyoha](https://avatars.discourse-cdn.com/v4/letter/g/f05b48/32.png) [@guyoha](https://discourse.haproxy.org/u/guyoha)\
**Post date:** [November 27, 2019, 6:23pm UTC](https://discourse.haproxy.org/t/implementing-hitless-reloads-within-haproxy-in-k8s/4568/1 "2019-11-27T18:23:28Z")

</div>

Hi  
I have HAproxy implementation in Kubernetes  
it is based on “haproxy:1.9” docker image.  
I want to be able to update configuration without the need to restart pods.  
I tried to follow “[https://www.haproxy.com/blog/hitless-reloads-with-haproxy-howto/](https://www.haproxy.com/blog/hitless-reloads-with-haproxy-howto/)”  
but the service fail to restart due to the following error :  
“unknown stats parameter ‘socket’, expects ‘admin’, ‘uri’, ‘realm’, ‘auth’, ‘scope’, ‘enable’, ‘hide-version’, ‘show-node’, ‘show-desc’ or ‘show-legends’”

What am I missing ?  
Are there any missing dependencies/utilities I need to include into the container in order to make it work ?

This is my haproxy.cfg:

```
  global
    maxconn 4000
    defaults
    log stdout format raw local0 debug
    maxconn 15000
    mode http
    option httplog
    option dontlognull
    retries 3
    timeout http-request 10s
    timeout queue 1m
    timeout connect 10s
    timeout client 45s
    timeout server 45s
    stats socket /var/run/haproxy.sock mode 600 expose-fd listeners level user
    stats enable
    stats hide-version
    stats scope .

  frontend chat_server_frontend
    bind *:80
    mode http
    default_backend web-backend

  backend web-backend
     balance roundrobin
     mode http
     server web1 172.17.0.18:8080 check
     server web2 172.17.0.16:8080 check
     server web3 172.17.0.19:8080 check
     stats refresh 1s
```

---

<div class="post-metadata">

**Author:** ![lukastribus](https://avatars.discourse-cdn.com/v4/letter/l/7ea924/32.png) [@lukastribus](https://discourse.haproxy.org/u/lukastribus)\
**Post date:** [November 27, 2019, 7:49pm UTC](https://discourse.haproxy.org/t/implementing-hitless-reloads-within-haproxy-in-k8s/4568/2 "2019-11-27T19:49:43Z")

</div>

`stats socket` belongs into the global section, but you put it into the defaults section.

---

<div class="post-metadata">

**Author:** ![guyoha](https://avatars.discourse-cdn.com/v4/letter/g/f05b48/32.png) [@guyoha](https://discourse.haproxy.org/u/guyoha)\
**Post date:** [November 27, 2019, 11:11pm UTC](https://discourse.haproxy.org/t/implementing-hitless-reloads-within-haproxy-in-k8s/4568/3 "2019-11-27T23:11:27Z")

</div>

Thanks  
That worked however configuration changes are still not picked up ☹

1. I ran the service
2. tail the log
3. removed backend server (server web3 172.17.0.19:8080 check) from the configuration (driven by configmap)
4. pushed the change into K8S
5. verified that the change is reflected inside the active pod
6. haproxy still see the server i removed (can see it on the log )

any suggestion? what am I missing?
