HAProxy에 Data Plain API 활성화시키기

60jong·2025년 9월 18일
0

Linux

목록 보기
2/2

/etc/haproxy/haproxy.cfg에 아래 두 옵션을 추가한 뒤

global
  stats socket /var/run/haproxy.sock mode 660 level admin

---

userlist dataplaneapi
  user admin insecure-password 000000

Data Plane API를 활성화하면 (sudo systemctl start dataplaneapi)

로컬에 5555번 포트로 Runtime entpoint가 생성된다.

ubuntu@ip-172-31-43-189:~$ curl -X GET --user admin:000000 http://localhost:5555/v3/info | jq
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100    90  100    90    0     0  98253      0 --:--:-- --:--:-- --:--:-- 90000
{
  "api": {
    "build_date": "2025-08-07T14:07:34.000Z",
    "version": "v3.2.3 daff5f5e"
  },
  "system": {}
}

참고 : https://www.haproxy.com/documentation/haproxy-data-plane-api/installation/install-on-haproxy/

profile
울릉도에 별장 짓고 싶다

0개의 댓글