mirror of
https://github.com/nclabteam/THPA.git
synced 2025-02-12 10:31:54 +00:00
45 lines
765 B
YAML
45 lines
765 B
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: app-example1
|
|
spec:
|
|
replicas: 3
|
|
selector:
|
|
matchLabels:
|
|
app: app-example1
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: app-example1
|
|
spec:
|
|
containers:
|
|
- name: app-example1
|
|
image: nguyennd1995/simpleapp_200
|
|
imagePullPolicy: Always
|
|
ports:
|
|
- containerPort: 8080
|
|
resources:
|
|
requests:
|
|
cpu: "50m"
|
|
memory: "32Mi"
|
|
limits:
|
|
cpu: "150m"
|
|
memory: "128Mi"
|
|
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: app-example1
|
|
labels:
|
|
app: app-example1
|
|
spec:
|
|
selector:
|
|
app: app-example1
|
|
ports:
|
|
- port: 8080
|
|
targetPort: 8080
|
|
protocol: TCP
|
|
nodePort: 30006
|
|
type: NodePort
|
|
|