Skip to content

Commit

Permalink
[feat/#87] Refactor: pod to deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
NayeonKeum committed Aug 31, 2023
1 parent fee84cc commit fe015e9
Show file tree
Hide file tree
Showing 5 changed files with 126 additions and 81 deletions.
Original file line number Diff line number Diff line change
@@ -1,25 +1,34 @@
apiVersion: v1
kind: Pod
apiVersion: apps/v1
kind: Deployment
metadata:
name: professor-{{ ID }}
namespace: professor-ns
labels:
app: professor-label-{{ ID }}
spec:
containers:
- name: professor-{{ ID }}
image: ryann3/professor-ubuntu:6.0
imagePullPolicy: Always
ports:
- name: nginx-port
containerPort: 80
- name: ssh-port
containerPort: 22
- name: webssh-port
containerPort: 8888
- name: server-port
containerPort: 8001
resources: {}
replicas: 1
selector:
matchLabels:
app: professor-label-{{ ID }}
template:
metadata:
labels:
app: professor-label-{{ ID }}
spec:
containers:
- name: professor-{{ ID }}
image: ryann3/professor-ubuntu:6.0
imagePullPolicy: Always
ports:
- name: nginx-port
containerPort: 80
- name: ssh-port
containerPort: 22
- name: webssh-port
containerPort: 8888
- name: server-port
containerPort: 8001
resources: {}
---
apiVersion: v1
kind: Service
Expand Down
Original file line number Diff line number Diff line change
@@ -1,25 +1,34 @@
apiVersion: v1
kind: Pod
apiVersion: apps/v1
kind: Deployment
metadata:
name: student-{{ ID }}
namespace: student-ns
labels:
app: student-label-{{ ID }}
spec:
containers:
- name: student-{{ ID }}
image: ryann3/student-ubuntu:6.0
imagePullPolicy: Always
ports:
- name: nginx-port
containerPort: 80
- name: ssh-port
containerPort: 22
- name: webssh-port
containerPort: 8888
- name: server-port
containerPort: 8001
resources: {}
replicas: 1
selector:
matchLabels:
app: student-label-{{ ID }}
template:
metadata:
labels:
app: student-label-{{ ID }}
spec:
containers:
- name: student-{{ ID }}
image: ryann3/student-ubuntu:6.0
imagePullPolicy: Always
ports:
- name: nginx-port
containerPort: 80
- name: ssh-port
containerPort: 22
- name: webssh-port
containerPort: 8888
- name: server-port
containerPort: 8001
resources: {}
---
apiVersion: v1
kind: Service
Expand Down
43 changes: 26 additions & 17 deletions resources/yamls/deploy-control-ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,29 +47,38 @@ roleRef:
kind: ClusterRole
name: access-to-apiserver-cr
---
apiVersion: v1
kind: Pod
apiVersion: apps/v1
kind: Deployment
metadata:
name: control-ubuntu
namespace: control-ns
labels:
app: control-label
spec:
containers:
- name: control-ubuntu
image: ryann3/control-ubuntu:5.0
imagePullPolicy: Always
ports:
- name: nginx-port
containerPort: 80
- name: ssh-port
containerPort: 22
- name: server-port
containerPort: 8003
- name: webssh-port
containerPort: 8886
resources: {}
serviceAccountName: access-to-apiserver-sa
replicas: 1
selector:
matchLabels:
app: control-label
template:
metadata:
labels:
app: control-label
spec:
containers:
- name: control-ubuntu
image: ryann3/control-ubuntu:5.0
imagePullPolicy: Always
ports:
- name: nginx-port
containerPort: 80
- name: ssh-port
containerPort: 22
- name: server-port
containerPort: 8003
- name: webssh-port
containerPort: 8886
resources: {}
serviceAccountName: access-to-apiserver-sa
---
apiVersion: v1
kind: Service
Expand Down
41 changes: 25 additions & 16 deletions resources/yamls/deploy-professor-ubuntu.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,34 @@
apiVersion: v1
kind: Pod
apiVersion: apps/v1
kind: Deployment
metadata:
name: professor-ubuntu
namespace: professor-ns
labels:
app: professor-label
spec:
containers:
- name: professor-ubuntu
image: ryann3/professor-ubuntu:5.0
imagePullPolicy: Always
ports:
- name: nginx-port
containerPort: 80
- name: ssh-port
containerPort: 22
- name: webssh-port
containerPort: 8887
- name: server-port
containerPort: 8002
resources: {}
replicas: 1
selector:
matchLabels:
app: professor-label
template:
metadata:
labels:
app: professor-label
spec:
containers:
- name: professor-ubuntu
image: ryann3/professor-ubuntu:5.0
imagePullPolicy: Always
ports:
- name: nginx-port
containerPort: 80
- name: ssh-port
containerPort: 22
- name: webssh-port
containerPort: 8887
- name: server-port
containerPort: 8002
resources: {}
---
apiVersion: v1
kind: Service
Expand Down
41 changes: 25 additions & 16 deletions resources/yamls/deploy-student-ubuntu.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,34 @@
apiVersion: v1
kind: Pod
apiVersion: apps/v1
kind: Deployment
metadata:
name: student-ubuntu
namespace: student-ns
labels:
app: student-label
spec:
containers:
- name: student-ubuntu
image: ryann3/student-ubuntu:5.0
imagePullPolicy: Always
ports:
- name: nginx-port
containerPort: 80
- name: ssh-port
containerPort: 22
- name: webssh-port
containerPort: 8888
- name: server-port
containerPort: 8001
resources: {}
replicas: 1
selector:
matchLabels:
app: student-label
template:
metadata:
labels:
app: student-label
spec:
containers:
- name: student-ubuntu
image: ryann3/student-ubuntu:5.0
imagePullPolicy: Always
ports:
- name: nginx-port
containerPort: 80
- name: ssh-port
containerPort: 22
- name: webssh-port
containerPort: 8888
- name: server-port
containerPort: 8001
resources: {}
---
apiVersion: v1
kind: Service
Expand Down

0 comments on commit fe015e9

Please sign in to comment.