생성과 접속 법
passwd root
go1!
watch -d kubectl get deploy,svc,pod -o wide
4
[root@s17f56ff32ee ~]# kubectl get deploy,svc,pod -o wide
NAME READY UP-TO-DATE AVAILABLE AGE CONTAINERS IMAGES SELECTOR
deployment.apps/deployment-2048 2/2 2 2 69s app-2048 alexwhen/docker-2048 app.kubernetes.io/name=app-2048
deployment.apps/tetris 2/2 2 2 38m tetris bsord/tetris app=tetris
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE SELECTOR
service/deployment-2048 LoadBalancer 198.19.179.93 default-deployment-2048-561dc-9982293-7ca0fdf4bfb0.sgn.lb.naverncp.com 80:32300/TCP 64s app.kubernetes.io/name=app-2048
service/kubernetes ClusterIP 198.19.128.1 <none> 443/TCP 8h <none>
service/tetris LoadBalancer 198.19.138.41 default-tetris-2245b-9982291-914a3d8e10c7.sgn.lb.naverncp.com 80:30512/TCP 38m app=tetris
NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES
pod/deployment-2048-79785cfdff-lt6fq 1/1 Running 0 67s 198.18.0.248 node11-w-1n7 <none> <none>
pod/deployment-2048-79785cfdff-mnjxh 1/1 Running 0 67s 198.18.1.31 node11-w-1n6 <none> <none>
pod/tetris-78b8bb6fcb-5w22c 1/1 Running 0 16m 198.18.0.18 node11-w-1n7 <none> <none>
pod/tetris-78b8bb6fcb-jfnw8
방향키 사용
같은 숫자 합치기 게임
3
k get ns
[root@s17f56ff32ee ~]# k get ns
NAME STATUS AGE
default Active 8h
kube-node-lease Active 8h
kube-public Active 8h
kube-system Active 8h
4
[root@s17f56ff32ee ~]# k get pods
No resources found in default namespace.
5
kubectl get deploy,svc,pod -o wide
[root@test11 ~]# kubectl get deploy,svc,pod -o wide
NAME READY UP-TO-DATE AVAILABLE AGE CONTAINERS IMAGES SELECTOR
deployment.apps/deployment-2048 2/2 2 2 46s app-2048 alexwhen/docker-2048 app.kubernetes.io/name=app-2048
deployment.apps/tetris 1/1 1 1 72s tetris bsord/tetris app=tetris
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE SELECTOR
service/deployment-2048 LoadBalancer 198.19.247.14 default-deployment-2048-c0d64-10251612-73e795b0c6f7.kr.lb.naverncp.com 80:30359/TCP 42s app.kubernetes.io/name=app-2048
service/kubernetes ClusterIP 198.19.128.1 <none> 443/TCP 23h <none>
service/tetris LoadBalancer 198.19.157.108 default-tetris-075d3-10251611-43faf1d23789.kr.lb.naverncp.com 80:30714/TCP 67s app=tetris
NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES
pod/deployment-2048-79785cfdff-7jnb2 1/1 Running 0 46s 198.18.4.170 game1-node-pool-w-1106 <none> <none>
pod/deployment-2048-79785cfdff-8lprm 1/1 Running 0 46s 198.18.2.175 game1-node-pool-w-1105 <none> <none>
pod/tetris-78b8bb6fcb-9zsvq 1/1 Running 0 72s 198.18.2.159 game1-node-pool-w-1105 <none> <none>
[root@test11 ~]#
6
2048 게임 - sing
http://default-deployment-2048-c0d64-10251612-73e795b0c6f7.kr.lb.naverncp.com/
테트리스 - sing
http://default-tetris-075d3-10251611-43faf1d23789.kr.lb.naverncp.com/
7
Global DNS
도메인
bestgame10.com
8
Global DNS에서
cname으로 로드밸런서 지정함