목록- (91)
Study Memory Work
package main import ( "fmt" "time" ) func main() { p := fmt.Println now := time.Now() p(now)// 2012-10-31 15:50:13.793654 +0000 UTC then := time.Date( 2009, 11, 17, 20, 34, 58, 651387237, time.UTC) p(then)// 2009-11-17 20:34:58.651387237 +0000 UTC p(then.Year()) p(then.Month()) p(then.Day()) p(then.Hour()) p(then.Minute()) p(then.Second()) p(then.Nanosecond()) p(then.Location()) p(then.Weekday()..
package main import ( "fmt" "os" ) type point struct { x, y int } func main() { p := point{1, 2} fmt.Printf("struct1: %v\n", p)// struct1: {1 2} fmt.Printf("struct2: %+v\n", p)// struct2: {x:1 y:2} fmt.Printf("struct3: %#v\n", p)// struct3: main.point{x:1, y:2} fmt.Printf("type: %T\n", p)// type: main.point fmt.Printf("bool: %t\n", true)// bool: true fmt.Printf("int: %d\n", 123)// int: 123 fmt.P..
package main import ( "fmt" s "strings" ) var p = fmt.Println func main() { p("Contains: ", s.Contains("test", "es")) p("Count: ", s.Count("test", "t")) p("HasPrefix: ", s.HasPrefix("test", "te")) p("HasSuffix: ", s.HasSuffix("test", "st")) p("Index: ", s.Index("test", "e")) p("Join: ", s.Join([]string{"a", "b"}, "-")) p("Repeat: ", s.Repeat("a", 5)) p("Replace: ", s.Replace("foo", "o", "0", -1)..
Hello World Values Variables Constants For If/Else Switch Arrays Slices Maps Range Functions Multiple Return Values Variadic Functions Closures Recursion Pointers Strings and Runes Structs Methods Interfaces Struct Embedding Generics Errors Goroutines Channels Channel Buffering Channel Synchronization Channel Directions Select Timeouts Non-Blocking Channel Operations Closing Channels Range over ..
app/cluster/network troubleshooting Master components Yaml파일 위치 : master node > etc/kubernetes/maifests/ component에 문제가 생겼을 때 위 위치에 있는 yaml파일을 열어 확인해볼 수 있다. Worker Node 동작 1. Docker 실행중인지 확인 $ sudo -i $ docker ps $ systemctl status docker 2. kublete 실행중인지 확인 $ systemctl status kubelet # 실행중이지 않으면 영구적으로 실행시키기 (--now) $ systemctl enable --now kubelet 3. kubeproxy 혹은 cni 동작중인지 확인 [문제 4] Worker Node..
Application Log 모니터링 • 지정한 Pod 내의 특정 컨테이너 애플리케이션 로그 확인 kubectl logs PODNAME -c CONTAINER_NAME kubectl run web --image=nginx kubectl get pods kubectl describe pod web Kubectl logs web Monitor 클러스터 리소스 모니터링 # Pod가 사용하는 CPU나 Memory 리소스 정보 보기 $ kubectl top pods --sort-by=cpu# --sort-by : 정렬 # Node가 사용하는 CPU나 Memory 리소스 정보 보기 $ kubectl top nodes --sort-by=cpu # Json 포맷을 기준으로 특정 리소스 sort 해서 보기 $ kubec..