File tree Expand file tree Collapse file tree 4 files changed +80
-5
lines changed Expand file tree Collapse file tree 4 files changed +80
-5
lines changed Original file line number Diff line number Diff line change
1
+ # Access pod
2
+
3
+ - 특정 pod bash에 접근
4
+
5
+ ``` bash
6
+ kubectl exec --stdin --tty < pod name> -- /bin/bash
7
+ ```
8
+
9
+ - network util pod 생성 및 shell 로그인
10
+
11
+ ``` bash
12
+ kubectl run < netutil name> --rm -i --tty --image praqma/network-multitool -- bash
13
+ ```
14
+
15
+ # Dashboard
16
+
17
+ - * 관련 reference* : ` https://kubernetes.io/ko/docs/tasks/access-application-cluster/web-ui-dashboard/ `
18
+
19
+ - dashboard UI 배포
20
+
21
+ ``` bash
22
+ kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/v2.4.0/aio/deploy/recommended.yaml
23
+ ```
24
+
25
+ - dashboard 접속 활성화
26
+
27
+ ``` bash
28
+ kubectl proxy
29
+ ```
30
+
31
+ - dashboard URL (접근)
32
+
33
+ ```
34
+ http://localhost:8001/api/v1/namespaces/kubernetes-dashboard/services/https:kubernetes-dashboard:/proxy/
35
+ ```
36
+
37
+ - dashboard UI에 접근에 사용할 token 얻기
38
+
39
+ ``` bash
40
+ kubectl -n kube-system describe secret $( kubectl -n kube-system get secret | awk ' /^deployment-controller-token-/{print $1}' ) | awk ' $1=="token:"{print $2}'
41
+ ```
42
+
43
+ # 참고 : TODO
44
+
45
+ - dashboard에 service, ingress, node 등의 항목이 나타나지 않는데, 이를 해결
Original file line number Diff line number Diff line change 55
55
> rs.isMaster ()
56
56
> rs.stepDown ()
57
57
```
58
-
59
- ## 참고
60
-
61
- - 특정 pod bash에 접근 : ` kubectl exec --stdin --tty <pod name> -- /bin/bash `
62
- - network util pod 생성 및 shell 로그인 ` kubectl run my-shell --rm -i --tty --image praqma/network-multitool -- bash `
Original file line number Diff line number Diff line change 13
13
- [ ingress 테스트] ( #ingress-테스트 )
14
14
- [ load balancer 테스트] ( #load-balancer-테스트 )
15
15
- [ 클러스터 삭제하기] ( #클러스터-삭제하기 )
16
+
16
17
# Description
17
18
18
19
- ** kind** 가 무엇인지, 어떻게 사용하는지
Original file line number Diff line number Diff line change
1
+ #! /bin/sh
2
+
3
+ Green=' \033[0;32m' # Green
4
+ NC=' \033[0m' # No Color
5
+
6
+ echo " ${Green} [startup] Creating k8s cluster...${NC} "
7
+ kind create cluster --config ./kind-config.yaml
8
+
9
+ echo
10
+ echo " ${Green} [startup] Deploying NGINX ingress controller...${NC} "
11
+ kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/main/deploy/static/provider/kind/deploy.yaml
12
+
13
+ echo
14
+ echo " ${Green} [startup] Waiting for NGINX setting completion...${NC} "
15
+ kubectl wait --namespace ingress-nginx \
16
+ --for=condition=ready pod \
17
+ --selector=app.kubernetes.io/component=controller \
18
+ --timeout=90s
19
+
20
+ echo
21
+ echo " ${Green} [startup] Creating metallb load balancer namespace...${NC} "
22
+ kubectl apply -f https://raw.githubusercontent.com/metallb/metallb/v0.12.1/manifests/namespace.yaml
23
+
24
+ echo
25
+ echo " ${Green} [startup] Deploying metallb...${NC} "
26
+ kubectl apply -f https://raw.githubusercontent.com/metallb/metallb/v0.12.1/manifests/metallb.yaml
27
+
28
+ echo
29
+ echo " ${Green} [startup] Waiting for metallb setting completion...${NC} "
30
+ # kubectl get pods -n metallb-system --watch
31
+ kubectl wait --namespace metallb-system \
32
+ --for=condition=ready pod \
33
+ --selector=app=metallb,component=speaker \
34
+ --timeout=90s
You can’t perform that action at this time.
0 commit comments