React 프로젝트를 생성하는 과정
1. Node.js 설치 하기
Node.js
Node.js® is a JavaScript runtime built on Chrome's V8 JavaScript engine.
nodejs.org
2. 폴더를 생성하고 Visual Studio에서 폴더를 연다 .

내가 만든 폴더의 이름은 종합설계 프로젝트를 따서 "jong_project"이다.
좌측 EXPLORER에 JONG_PROJECT가 떴으면 성공 !
3. React 프로젝트 생성
폴더를 연 Visual studio에서 terminal을 연 다음,
$npx create-react-app [프로젝트 명]
명령어를 입력한다.
npx: Node.js 설치가 되어있어야함. 라이브러리 설치를 도와주는 명령어
4. 프로젝트 생성 확인

react project에 필요한 기본적인 파일들이 자동으로 만들어지고, react 실행에 쓰일 명령어들을 보여주면
react 프로젝트가 성공적으로 만들어진 것 이다.
terminal에
$npm start
라는 명령어를 치면 localhost:3000 웹사이트가 켜지면서 리액트가 돌아가는걸 확인할 수 있다.

🟣 컨테이너란 ?
우리가 구동하려는 애플리케이션을 실행하는데 필요한 환경을 모두 포함해서 어디서든 쉽게(독립적으로)실행할 수 있도록 해 주는 기술
즉, PC에 프로그램을 설치하는 경우, 특정 경로를 설정해주거나 필요한 환경을 구축하는 과정 등을 생략할 수 있도록 도와준다.
도커(Docker)
도커란?
컨테이너를 다루는 도구 중 가장 많이 쓰이는 도구, 즉 하나의 컨테이너를 관리하는 도구이다.
쿠버네티스(Kubernetes)
쿠버네티스란?
컨테이너를 다루는 도구를 통해 컨테이너를 관리하는 도구( = 컨테이너를 다루는 도구를 관리하는 툴, 여러 개의 컨테이너를 관리)
즉, 쿠버네티스는 문제가 생긴 컨테이너를 교체하거나 컨테이너 사용에 필요한 환경설정 및 비밀번호를 관리해주고 주입해주는 등의 역할을 한다.

Docker 설치하기
https://docs.docker.com/desktop/install/mac-install/
Install Docker Desktop on Mac
Install Docker for Mac to get started. This guide covers system requirements, where to download, and instructions on how to install and update.
docs.docker.com
m1 pro 칩을 사용하고 있기 때문에 Apple Chip을 선택하였다.

terminal에 $docker -v 명령어를 치면 설치된 docker의 버전을 확인할 수 있다. 성공적으로 깔렸다는 의미이기도 하다 !
$docker -v
Docker version 25.0.3, build 4debf41
terminal에 $docker run hello-world 명령어를 치면 hello-world 이미지를 로컬 레포지토리에서 찾을 수 없다는 메세지를 띄운후,
그 뒤로 doker hello-world Image를 Pull 받아서 Conatiner 생성하여 실행시킨다.
$docker run hello-world
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
478afc919002: Pull complete
Digest: sha256:d000bc569937abbe195e20322a0bde6b2922d805332fd6d8a68b19f524b7d21d
Status: Downloaded newer image for hello-world:latest
Hello from Docker!
This message shows that your installation appears to be working correctly.
To generate this message, Docker took the following steps:
1. The Docker client contacted the Docker daemon.
2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
(arm64v8)
3. The Docker daemon created a new container from that image which runs the
executable that produces the output you are currently reading.
4. The Docker daemon streamed that output to the Docker client, which sent it
to your terminal.
To try something more ambitious, you can run an Ubuntu container with:
$ docker run -it ubuntu bash
Share images, automate workflows, and more with a free Docker ID:
https://hub.docker.com/
For more examples and ideas, visit:
https://docs.docker.com/get-started/
위와 같은 메세지가 뜬다면, Docker 환경 설정은 완료된 것 이다!!
$docker ps -a
명령어를 이용하여 생성된 컨테이너 목록을 확인할 수 있다.

현재 실행중인 컨테이너를 보려면, -a 옵션을 빼면 된다.
쿠버네티스 설치
여러번의 시도를 했지만, 잘 깔리지 않아서 참고한 블로그를 첨부하겠다.. !!
https://velog.io/@pinion7/macOs-m1-환경에서-kubernetes-시작하기
macOs m1 환경에서 Kubernetes 시작하기(feat. Docker)
- kubernetes 개발환경과 운영환경의 구축 방식이 다름을 이해할 수 있다. - macOs m1 환경에서 kubernetes 개발환경을 구축할 수 있다. - docker와 kubernetes 각각으로 배포를 실습하고 간단한 차이를 인지해
velog.io
'Project > 종합설계 프로젝트2' 카테고리의 다른 글
쿠버네티스에 React 올리기(2) (0) | 2024.03.10 |
---|