Setting up a Local Nginx with a Self-Signed Certificate

In this blog post, we will discuss how to create a local Nginx server with 443 port and redirect 80 to 443 with Docker Compose. We will also include the command for generating a self-certificate. Setting up the Docker Compose File Firstly, we need to create a docker-compose.yml file in the root directory of our project. In this file, we will define the service for the Nginx server. 1 2 3 4 5 6 7 8 9 10 11 12 13 version: "3....

July 6, 2023 · 4 min · Justin Hung

Tips-and-examples

Tips When following this SOP, if you find any suspicious problems, but you are not sure if they are the problem, please record them and continue to the next step, instead of getting stuck here. Specifically, you can take the following steps: Record the problems you find. This will help you remember what you found and how you found it. Continue to the next step. Don’t get stuck on a problem that you’re not sure about....

July 6, 2023 · 2 min · Justin Hung

Useful Scripts for managing K8s

Getting all resources in namespace 1 2 3 kubectl api-resources --verbs=list --namespaced -o name \ | xargs -n 1 kubectl get --show-kind --ignore-not-found \ -l <label>=<value> -n $namespace Remove terminating namespace using remove-terminating-namespace.sh to remove the namespace that is stuck in the status Terminating 1 2 3 4 5 6 7 8 9 10 # remove-terminating-namespace.sh if [[ $# -ne 1 ]]; then echo "Please input only namespace name" exit 1 fi ns=$1 kubectl get ns ${ns} -o json > tmp....

May 1, 2022 · 2 min · Justin Hung

Recent Learning Skills and Articals

Plan to Learn multi-stage builds Trunk Based Development Backstage Crossplane k8up K8s envoy - service mesh Greate Articals Pod’s liveness & readiness Summary: TBD

May 1, 2022 · 1 min · Justin Hung

Windows Working Environment Setup (with WSL and ZSH)

Achievement WSL2 + Docker Desktop + zsh/zim + brew Step 1: WSL2 New Way requirement: Windows 10 version 2004 and higher (Build 19041 and higher) or Windows 11 wsl --install Old Way Link: https://docs.microsoft.com/zh-tw/windows/wsl/install-win10 Quick command: Enable WSL2 dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart Check system version X64:1903 with 18362 or up ARM64 : 2004 with 19041 or up Enable VM Platform dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart Reboot Download kernal update wsl_update_x64....

March 13, 2021 · 4 min · Justin Hung