Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/changjoo-park/nuxt-k8s
Nuxt앱을 minikube를 이용해 컨테이너화 합니다
https://github.com/changjoo-park/nuxt-k8s
Last synced: 3 days ago
JSON representation
Nuxt앱을 minikube를 이용해 컨테이너화 합니다
- Host: GitHub
- URL: https://github.com/changjoo-park/nuxt-k8s
- Owner: ChangJoo-Park
- Created: 2019-06-25T08:26:02.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-01-04T01:03:45.000Z (almost 2 years ago)
- Last Synced: 2024-10-12T09:10:39.574Z (about 1 month ago)
- Language: Vue
- Size: 2.08 MB
- Stars: 4
- Watchers: 1
- Forks: 1
- Open Issues: 20
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# nuxt-k8s
> My delightful Nuxt.js project
## Build Setup
``` bash
# install dependencies
$ npm run install# serve with hot reload at localhost:3000
$ npm run dev# build for production and launch server
$ npm run build
$ npm run start# generate static project
$ npm run generate
```For detailed explanation on how things work, checkout [Nuxt.js docs](https://nuxtjs.org).
## Minikube로 k8s 테스트
### DockerHub에 이미지를 올리지 않고 로컬에서 하려면
```bash
eval $(minikube docker-env) # minikube에서 할때
eval $(minikube docker-env -u) # 비활성화
```### Minikube 시작
```bash
minikube start
```### Docker 이미지 만들기
```bash
docker build -t app:0.1 .
```### 도커 이미지로 실행해보기 (선택사항)
```bash
docker run --name app -p 3000:3000 app:0.1
```### kubernetes 를 이용해서 Docker 이미지 실행하기
```bash
kubectl run app --image=app:0.1 --port=3000 --image-pull-policy=Never
```### 배포 및 Kubernetes 상태 확인
```bash
kubectl get deployments # 배포상태 확인
kubectl get pods # Pods 확인
kubectl get events # 이벤트 확인
kubectl config view
```### 외부에서 접근할 수 있도록 IP 노출하기
```bash
kubectl expose deployment app --type=LoadBalancer
```### minikube로 실행하기
```bash
minikube service app
```### 도커 이미지 업데이트
...코드 수정 후
```bash
docker build -t app:0.2 .
kubectl set image deployment/app app=app:0.2
```### 기타
대시보드 보는 방법
```bash
minikube dashboard
```