/images/avatar.png

Kubernetes Structure

Kubernetes Structure Note Here’s explanation of Kubernetes structure that I understand. So, it could be wrong. I just record for memory. Cluster A computing set they have a same purpose. In Kubernetes, there are Master and Node. Master A controller for managing the Cluster. Node This is a physical machine that is for deploying containers. POD The POD is a deployment unit in Kubernetes. A POD has multiple containers. The Kubernetes is managing this unit.

Go Method

What is mean of Method? The Method means a function of a class in OOP. Value vs Pointer receiver There are two ways to receive the structure. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 package main type Rect struct { width, height int } // Value receiver func (r Rect) areaWithValue() int { r.

Go Gin Gonic Split Routes

Go to source in github Example Source Link Directory structure Directory structure 1 2 3 4 5 6 7 8 9 10 . ├── go.mod ├── go.sum ├── main.go ├── post │ └── routes.go ├── schedule │ └── routes.go └── user └── routes.go Source /post/routes.go 1 2 3 4 5 6 7 8 9 10 11 12 13 14 package post import "github.com/gin-gonic/gin" func Routes(r *gin.Engine) { post := r.Group("/post") { post.

Go Package Manager

Go package manager Initialize Go init 1 go init mod [Package Name] This command generate a go.mod file. Generate requirements Go requirements 1 go mod tidy This command add requirements to go.mod and generate go.sum.

Linux find with exec

find command find command examples 1 2 3 find . -type f -user username find . -type f -group username find with -exec find command with -exec 1 find . -type f -user username -exec chown anotheruser:anotheruser {} \;