OAuth2 Proxy Practice

Introduction OAuth2-proxy is a reverse proxy which provides authentication with Google, Azure, OpenID Connect and many more identity providers. For me, we have prometheus and alertmanager on our K8s cluster. We can use oauth2-proxy to proxy the requests to prometheus and alertmanager. That’s quite essential for a robust and secure monitoring system. However, the above two services do not come with an out-of-box authentication module, which means if we expose them to the internet, everyone can access them....

January 22, 2025 · 4 min · 734 words · Me

Postgresql HA Cluster

Postgresql HA Solution choice cloudnative-pg/cloudnative-pg: CloudNativePG is a comprehensive platform designed to seamlessly manage PostgreSQL databases within Kubernetes environments, covering the entire operational lifecycle from initial deployment to ongoing maintenance Active community, high stars, fancy solution, tailored for K8s. An introduction: 4,300 GitHub Stars and Counting: CloudNativePG Now the World’s #1 PostgreSQL Operator for Kubernetes Installation Installation by Helm: cloudnative-pg/charts: CloudNativePG Helm Charts While we are installing cnpg/cloudnative-pg Chart with version 0....

December 13, 2024 · 7 min · 1291 words · Me

Host My Own ChatGPT

The Claude is quite difficult to get onboard, as you have to prepare a phone number and a credit card. Also, if you subscribe to the Pro plan, you will only get access the the Claude model(it’s quite powerful). But I prefer more choices, I want to use different models under different circumstances, e.g. I want to use Claude when I am coding, use OpenAI o1 to to math or reasoning or gpt-3....

November 29, 2024 · 2 min · 368 words · Me

Helm Install MySQL Cluster

Comparison I have to disclaim that due to my limitation of knowledge, the following is just my personal opinion(according to my experience). So there may be some errors or omissions. If you have any suggestions, please let me know. Feature MySQL Operator Bitnami MySQL Percona XtraDB Cluster High Availability Yes Yes Yes Automatic Failover Yes No Yes Backup/Restore Yes No Yes Scaling Yes Limited Yes Custom Configurations Yes Limited Yes Multi-Master Replication Yes No Yes Ease of Setup Moderate Simple Moderate Community Support Weak Strong Strong Cloud Native Yes No Yes Installation Bitnami MySQL As to my concern, the bitnami one does not have a failover solution, so if the mater is down, it will be down for sure....

November 29, 2024 · 5 min · 1062 words · Me

Ghost Migration

Migration from Ghost(Docker) to Ghost(K8s) Recently I am prepparing for migrating my blog from Ghost(Docker on Baremetal) to Ghost(on K8s). Changes Previous Previous Now Host Docker K8s Database Mariadb Mysql S3 Cloudflare R2 Cloudflare R2 Route Caddy Ingress Steps Boot up the new Ghost I am using the official docker image1 to boot up the new Ghost. I am quite sure the official image is the most suitable one for me to run instead of bitnami one(it has way too many self defined logic processes in it)....

November 27, 2024 · 3 min · 576 words · Me