Kubernetes: liveness & readiness probes with Nginx and PHP-FPM

Last time I wrote about linking PHP-FPM and Nginx on Kubernetes (but also Docker). It is very common configuration because PHP is so popular as backend and Nginx offers great performance with low resources usage. If we use such mix, we should also think more about proper health check in our cluster. Without that, it is possible clients will “hit the wall” if some of services will stop work or when we will add some important hotfix during normal work. Fortunately, Kubernetes offers us build-in solution to quickly determine state of our pods and containers inside them. Thanks to this, we can periodically check state and decide if something requires attention or automatic actions from infrastructure level. Let’s check them in term of mentioned PHP and Nginx configuration.

Continue reading “Kubernetes: liveness & readiness probes with Nginx and PHP-FPM”

Kubernetes: Nginx and PHP-FPM

When we want to use PHP-FPM, in most cases, we also need to use some of the web servers. Typical choice is Nginx because it is a very light, reliable, and configurable solution which can handle even very big traffic without any issues. There are two methods of linking Nginx and PHP-FPM on the backend: TCP connections and UNIX sockets. In this post, I would like to share them in term of Kubernetes configuration. It can be applied also on standard Docker solutions without issues.

Continue reading “Kubernetes: Nginx and PHP-FPM”

How to Restore Focus and Wellbeing

Last year I have read amazing book Stolen Focus: Why You Can’t Pay Attention by Johann Hari. It was a part of checking what can cause issues during my life, why I sometimes feel bad and totally overwhelmed. This book does not resolve issues but gives a lot of information what can we do, to improve daily basics. Of course, as in many cases, after reading for a while I had some plans in my head, but then came other responsibilities and I lost them. In effect, last quarter was hard, I think the hardest in my carrer because I was even considering leaving the IT industry, temporarily or permanently.

There were a lot of factors: stress in work, some changes I did not accepted, other people actions and a lot of stuff on my head, not only in work, but also in personal life. I was “on the edge” when I was reminded of the most important principle of stoicism: focus on what you can control. So, I have decided to look for issues in my behavior and fix them, work on them to recover not only focus, but general wellbeing. During last few weeks, I have decided to cut, remove a lot of things from my life, especially digital stuff. Some of them may look strange, but results are amazing, especially for me, so I have decided to write a post about that, maybe it will help.

Continue reading “How to Restore Focus and Wellbeing”

Kuberenetes: Exposing

Kubernetes are amazing, very powerful tool and even small details are important. Of course, in complex solutions we always use YAML files to control our cluster, but for small tests, projects and changes we can also use just some commands. In this short post I would like to describe how to expose our app using services. Thanks to this solution pods inside cluster will be able to communicate it other, also we will be able to reach them.

Continue reading “Kuberenetes: Exposing”

ChatGPT Over a Year Later

Do you use ChatGPT or other, similar tool? I can say, I use it almost every day and for multiple purposes. Not only because of work – but it is probably the most beneficial in this area, but also in my personal life. To check some information, to get advice, to prepare trip plans or even to not forget about something important, when I will prepare to something. During last year it was transformed from some nice, maybe a bit exotic stuff into powerful tool we can – and maybe even should – utilize to simplify our lives and be more efficient. I know there is a lot of articles about ChatGPT, but I’ve decided to write what I think about that, also with some comparison to other “revolutions” we observed in last few years.

Continue reading “ChatGPT Over a Year Later”