You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

129 lines
2.5 KiB

apiVersion: apps/v1
kind: Deployment
metadata:
name: Name-For-Replace
namespace: service
labels:
app: Name-For-Replace
spec:
replicas: 1
revisionHistoryLimit: 5
selector:
matchLabels:
app: Name-For-Replace
template:
metadata:
labels:
app: Name-For-Replace
spec:
containers:
- name: Name-For-Replace
image: harbor125.gxxhygroup.com/Type-For-Replace/Name-For-Replace:latest
imagePullPolicy: Always
ports:
- containerPort: 8888
readinessProbe:
tcpSocket:
port: 8888
initialDelaySeconds: 5
periodSeconds: 10
livenessProbe:
tcpSocket:
port: 8888
initialDelaySeconds: 15
periodSeconds: 20
resources:
requests:
cpu: 500m
memory: 512Mi
limits:
cpu: 1000m
memory: 1024Mi
volumeMounts:
- name: timezone
mountPath: /etc/localtime
volumes:
- name: timezone
hostPath:
path: /usr/share/zoneinfo/Asia/Shanghai
---
apiVersion: v1
kind: Service
metadata:
name: Name-For-Replace-svc
namespace: service
spec:
ports:
- port: 8888
targetPort: 8888
selector:
app: Name-For-Replace
---
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: Name-For-Replace-hpa-c
namespace: service
labels:
app: Name-For-Replace-hpa-c
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: Name-For-Replace
minReplicas: 1
maxReplicas: 10
metrics:
- type: Resource
resource:
name: cpu
target:
type: Utilization
averageUtilization: 80
---
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: Name-For-Replace-hpa-m
namespace: service
labels:
app: Name-For-Replace-hpa-m
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: Name-For-Replace
minReplicas: 1
maxReplicas: 10
metrics:
- type: Resource
resource:
name: memory
target:
type: Utilization
averageUtilization: 80
---
kind: Ingress
apiVersion: networking.k8s.io/v1
metadata:
name: Name-For-Replace
namespace: service
spec:
rules:
- host: Name-For-Replace-dev.gxxhygroup.com
http:
paths:
- path: /
pathType: ImplementationSpecific
backend:
service:
name: Name-For-Replace-svc
port:
number: 8888