일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | |||||
3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 |
Tags
- ExceptionHandler
- MySQL
- nextjs
- mock
- test
- Spring
- jsonview
- hibernate
- Spring MVC
- Example
- RESTful
- docker-compose
- content-type
- Intellij
- Redis
- docker
- namedqueries
- junit
- HttpHeader
Archives
- Today
- Total
hellokiseok
Redis Docker or Docker-compose 본문
Docker
# 간단 버전
docker run --name redis -d -p 6379:6379 redis redis-server
# 인증 추가
docker run --name redis -d -p 6379:6379 redis redis-server --requirepass 1234
Docker-compose
docker-compose.yml
version: '3.1'
services:
redis:
image: redis
command: --requirepass 1234
restart: always
ports:
- 6379:6379
docker-compose -f docker-compose.yml -p redis up
Kubernetes
Deployment
apiVersion: apps/v1
kind: Deployment
metadata:
name: redis
labels:
app: redis
spec:
replicas: 1
revisionHistoryLimit: 1
selector:
matchLabels:
app: redis
template:
metadata:
labels:
app: redis
spec:
containers:
- name: redis
image: redis
command:
- redis-server
ports:
- name: redis
containerPort: 6379
---
apiVersion: v1
kind: Service
metadata:
name: redis
labels:
name: redis
spec:
ports:
- port: 6379
targetPort: 6379
type: LoadBalancer
selector:
app: redis
참고 사이트 : https://hub.docker.com/_/redis
'Docker' 카테고리의 다른 글
Mysql Docker or Docker-compose (0) | 2020.05.26 |
---|---|
Next.js + Docker 설정하기 (0) | 2020.05.26 |