Posts

Showing posts from December, 2022

Redis pubsub and reactive programming

 https://github.com/jonashackt/spring-reactive-redis-messaging

Assign pods to nodes

 https://kubernetes.io/docs/tasks/configure-pod-container/assign-pods-nodes/

How to understand Prometheus query

http_requests_total{environment="testing",method="GET"} = 1 http_requests_total{environment="development",method="GET"} = 2 http_requests_total{environment="staging",method="GET"} = 1 Nếu bạn muốn hiển thị 1 metric là tổng số request GET thì chỉ cần đơn giản thực hiện query sau sum (http_requests_total{method="GET"}) sum (http_requests_total{method="GET"}) without(environment) sum (http_requests_total{method="GET"}) by(method)

Check logs in docker container

watch -n 0 "docker logs mycontainer"

Check worker node usage

  Use the following commands to check workload usage in CLI: kubectl top pod kubectl describe pod NAME                             CPU(cores)   CPU%   MEMORY(bytes)   MEMORY%     node-1   185m         11%     2671Mi           39%         node-2   145m         9%     2755Mi           40%         node-3   177m         11%     2767Mi           40%         coax-1         1137m         31%     3132Mi           45%         coax-2         107m         2%     1969Mi           28%     ...