Skip to content

Instantly share code, notes, and snippets.

View songleo's full-sized avatar
🏠
Working from home

Song Song Li songleo

🏠
Working from home
View GitHub Profile
@mattes
mattes / check.go
Last active October 11, 2024 16:22
Check if file or directory exists in Golang
if _, err := os.Stat("/path/to/whatever"); os.IsNotExist(err) {
// path/to/whatever does not exist
}
if _, err := os.Stat("/path/to/whatever"); !os.IsNotExist(err) {
// path/to/whatever exists
}
@philips
philips / users.md
Last active April 5, 2023 14:17
Kubernetes Third-Party Resource Users
@sanketsudake
sanketsudake / kind-kubernetes-metrics-server.md
Last active October 30, 2024 12:15
Running metric-server on Kind Kubernetes

I have created a local Kubernetes cluster with kind. Following are changes you need to get metric-server running on Kind.

Deploy latest metric-server release.

kubectl apply -f https://github.com/kubernetes-sigs/metrics-server/releases/download/v0.5.0/components.yaml

Within existing arguments to metric-server container, you need to add argument --kubelet-insecure-tls.