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

Setting up Spring Boot Web App on Kubernetes

Prerequisites It’s recommended to have following skills before starting : Basic knowledge of Java, Gradle, Docker and Kubernetes Components’ version : JDK 8 or higher Please ensure you have a JDK installed and not just a JRE Docker installed Kubectl installed IDE (IntelliJ, Eclipse, VSCode) Dockerize Makes original app build and run via Docker Spring Initializr Details : Spring initializr () Clone project and add to IDE 1 2 3 4 5 6 7 8 9 10 11 12 curl https://start....

February 23, 2021 · 5 min · Justin Hung