C:\Windows\system32>minikube start * Microsoft Windows 10 Pro 10.0.19043 Build 19043 의 minikube v1.27.1 * 기존 프로필에 기반하여 hyperv 드라이버를 사용하는 중 * minikube 클러스터의 minikube 컨트롤 플레인 노드를 시작하는 중 * Restarting existing hyperv VM for "minikube" ... * 쿠버네티스 v1.25.2 을 Docker 20.10.18 런타임으로 설치하는 중 * Kubernetes 구성 요소를 확인... - Using image gcr.io/k8s-minikube/storage-provisioner:v5 * 애드온 활성화 : storage-provisioner, default-storageclass
! C:\Program Files\Docker\Docker\resources\bin\kubectl.exe is version 1.21.3, which may have incompatibilites with Kubernetes 1.25.2. - Want kubectl v1.25.2? Try 'minikube kubectl -- get pods -A' * 끝났습니다! kubectl이 "minikube" 클러스터와 "default" 네임스페이스를 기본적으로 사용하도록 구성되었습니다.
C:\Windows\system32>kubectl version Client Version: version.Info{Major:"1", Minor:"23", GitVersion:"v1.23.5", GitCommit:"c285e781331a3785a7f436042c65c5641ce8a9e9", GitTreeState:"clean", BuildDate:"2022-03-16T15:58:47Z", GoVersion:"go1.17.8", Compiler:"gc", Platform:"windows/amd64"} Server Version: version.Info{Major:"1", Minor:"25", GitVersion:"v1.25.2", GitCommit:"5835544ca568b757a8ecae5c153f317e5736700e", GitTreeState:"clean", BuildDate:"2022-09-21T14:27:13Z", GoVersion:"go1.19.1", Compiler:"gc", Platform:"linux/amd64"} WARNING: version difference between client (1.23) and server (1.25) exceeds the supported minor version skew of +/-1
C:\Users\move_>docker ps error during connect: This error may indicate that the docker daemon is not running.: Get "http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.24/containers/json": open //./pipe/docker_engine: The system cannot find the file specified.
원인 : 도커 데몬이 미실행
최초 조치 : 도커 데스크탑 실행 > 알약에서 차단
조치 방법 : 알약 > 환경설정 > 탐지제외 에 위 경로 및 파일을 예외로 추가
C:\Users\move_>docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 4a8cd91e7be7 mariadb:latest "docker-entrypoint.s…" 6 days ago Up 34 seconds 3306/tcp wp_db_1 351ecfbe3c95 wordpress:latest "docker-entrypoint.s…" 6 days ago Up 34 seconds 0.0.0.0:8000->80/tcp, :::8000->80/tcp wp_wordpress_1
이를 도커 이미지로 빌드하는데 시간이 꽤 걸렸다. 796.8s 이니깐 대략 13분 좀 넘게 소요되었네
빌드한 이미지를 실행하려고 했는데, 오류가 나서 살펴보민
Error에 module이 없다는 것인데, VSCode로 보니 오타가 있었다. 뒤에 QQ를 빼고 다시 실행해주니 잘 실행되고, 웹접속도 성공하였다.
D:\05.Lab\01.test\web>docker run -p 3000:3000 web
internal/modules/cjs/loader.js:638
throw err;
^
Error: Cannot find module '/usr/src/app/app.jsQQ'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
at Function.Module._load (internal/modules/cjs/loader.js:562:25)
at Function.Module.runMain (internal/modules/cjs/loader.js:831:12)
at startup (internal/bootstrap/node.js:283:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:623:3)
D:\05.Lab\01.test\web>docker images
D:\05.Lab\01.test\web>
D:\05.Lab\01.test\web>
D:\05.Lab\01.test\web>
D:\05.Lab\01.test\web>docker run -p 3000:3000 web
{"level":30,"time":1638947532214,"pid":8,"hostname":"1a97ede7f0a9","msg":"Server listening at http://0.0.0.0:3000"}
{"level":30,"time":1638947532215,"pid":8,"hostname":"1a97ede7f0a9","msg":"server listening on http://0.0.0.0:3000"}
{"level":30,"time":1638947532503,"pid":8,"hostname":"1a97ede7f0a9","reqId":"req-1","req":{"method":"GET","url":"/","hostname":"127.0.0.1:3000","remoteAddress":"172.17.0.1","remotePort":52382},"msg":"incoming request"}
{"level":30,"time":1638947532535,"pid":8,"hostname":"1a97ede7f0a9","reqId":"req-1","res":{"statusCode":200},"responseTime":20.34059999883175,"msg":"request completed"}
기존 테스트 중지를 안하니 오류가 발생
C:\Users\move_>docker run -p 3001:3000 web
docker: Error response from daemon: driver failed programming external connectivity on endpoint hungry_satoshi (3220b1383366fafc9092bc9f3d1743ca9d080e512f7b739826f4b760d22405c8): Bind for 0.0.0.0:3001 failed: port is already allocated.
그런데 기존 테스트때문이 아니었음
껐음에도 동일한 오류가 발생해서 혹시 내가 할당하는 포트의 충돌인가 싶어서 3002번으로 변경하였더니
웹도 잘 출력되고 cmd창에 로그도 잘 찍혔다.
C:\Users\move_>docker run -p 3001:3000 web
docker: Error response from daemon: driver failed programming external connectivity on endpoint beautiful_tereshkova (b6841b2541526d8a4f92368b738311a6d6420946329b1e45892756d068f414f9): Bind for 0.0.0.0:3001 failed: port is already allocated.
C:\Users\move_>docker run -p 3002:3000 web
{"level":30,"time":1638948253156,"pid":8,"hostname":"cfbf8a5cf3c6","msg":"Server listening at http://0.0.0.0:3000"}
{"level":30,"time":1638948253158,"pid":8,"hostname":"cfbf8a5cf3c6","msg":"server listening on http://0.0.0.0:3000"}
{"level":30,"time":1638948263812,"pid":8,"hostname":"cfbf8a5cf3c6","reqId":"req-1","req":{"method":"GET","url":"/","hostname":"127.0.0.1:3002","remoteAddress":"172.17.0.1","remotePort":49984},"msg":"incoming request"}
{"level":30,"time":1638948263832,"pid":8,"hostname":"cfbf8a5cf3c6","reqId":"req-1","res":{"statusCode":200},"responseTime":18.8648000061512,"msg":"request completed"}
{"level":30,"time":1638948264280,"pid":8,"hostname":"cfbf8a5cf3c6","reqId":"req-2","req":{"method":"GET","url":"/favicon.ico","hostname":"127.0.0.1:3002","remoteAddress":"172.17.0.1","remotePort":49984},"msg":"incoming request"}
{"level":30,"time":1638948264281,"pid":8,"hostname":"cfbf8a5cf3c6","reqId":"req-2","msg":"Route GET:/favicon.ico not found"}
{"level":30,"time":1638948264283,"pid":8,"hostname":"cfbf8a5cf3c6","reqId":"req-2","res":{"statusCode":404},"responseTime":2.851500004529953,"msg":"request completed"}