Skip to content

Commit

Permalink
feat: kubernetes deployments.yaml 파일 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
EOTAEGYU committed Nov 9, 2024
1 parent c293c87 commit 70c14be
Show file tree
Hide file tree
Showing 4 changed files with 78 additions and 0 deletions.
11 changes: 11 additions & 0 deletions kubernetes/mysql-service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
apiVersion: v1
kind: Service
metadata:
name: mysql
spec:
type: ClusterIP
ports:
- port: 3306
targetPort: 3306
selector:
app: mysql
37 changes: 37 additions & 0 deletions kubernetes/mysql-statefulset.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: mysql
spec:
serviceName: mysql
replicas: 1
selector:
matchLabels:
app: mysql
template:
metadata:
labels:
app: mysql
spec:
containers:
- name: mysql
image: eotaegyu/mysql
env:
- name: MYSQL_ROOT_PASSWORD
value: "root1234!!"
- name: MYSQL_DATABASE
value: "keynote"
ports:
- containerPort: 3306
volumeMounts:
- name: mysql-storage
mountPath: /var/lib/mysql
volumeClaimTemplates:
- metadata:
name: mysql-storage
spec:
accessModes: [ "ReadWriteOnce" ]
resources:
requests:
storage: 5Gi
storageClassName: ""
19 changes: 19 additions & 0 deletions kubernetes/springboot-deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: springboot-app
spec:
replicas: 3
selector:
matchLabels:
app: springboot-app
template:
metadata:
labels:
app: springboot-app
spec:
containers:
- name: springboot-app
image: eotaegyu/keynote.app
ports:
- containerPort: 8080
11 changes: 11 additions & 0 deletions kubernetes/springboot-service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
apiVersion: v1
kind: Service
metadata:
name: springboot-service
spec:
type: LoadBalancer
ports:
- port: 80
targetPort: 8080
selector:
app: springboot-app

0 comments on commit 70c14be

Please sign in to comment.