oauth2

authorization-deployment.yaml:

apiVersion: apps/v1
kind: Deployment
metadata:
name: authorization-pod
spec:
replicas: 3
selector:
matchLabels:
app: authorization-pod
template:
metadata:
labels:
app: authorization-pod
spec:

containers:
- name: authorization-center
image: 镜像
imagePullPolicy: IfNotPresent
readinessProbe:
tcpSocket:
port: 9003
initialDelaySeconds: 5
periodSeconds: 11
ports:
- containerPort: 9003
env:
- name: JAVA_OPTS
value: "-server -Xms2048m -Xmx2048m"
- name: input_args
value: "--server.port=9003"
resources:
requests:
cpu: 1000m
memory: 1000Mi
limits:
cpu: 2000m
memory: 2000Mi

authorization-service.yaml:

apiVersion: v1
kind: Service
metadata:
name: authorization-center
spec:
ports:
- name: authorization-center
port: 80
targetPort: 9003
nodePort: 30093
type: NodePort
selector:
app: authorization-pod

authorization-hpa.yaml:

apiVersion: autoscaling/v1
kind: HorizontalPodAutoscaler
metadata:
name: authorization-hpa
labels:
app: authorization-pod

spec:
maxReplicas: 10
minReplicas: 2
targetCPUUtilizationPercentage: 70
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: authorization-pod

posted @ 2019-06-19 15:14  carjayal  阅读(92)  评论(0)    收藏  举报