12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576 |
- ---
- apiVersion: v1
- kind: Service
- metadata:
- labels:
- app: http-backend
- service: http-backend
- name: http-backend
- namespace: prd
- spec:
- ports:
- - name: http
- port: 8080
- protocol: TCP
- targetPort: 8080
- selector:
- app: http-backend
- type: ClusterIP
- ---
- apiVersion: v1
- kind: ServiceAccount
- metadata:
- name: http-backend
- namespace: prd
- labels:
- account: http-backend
- ---
- apiVersion: apps/v1
- kind: Deployment
- metadata:
- labels:
- app: http-backend
- version: v1
- name: http-backend-v1
- namespace: prd
- spec:
- replicas: 1
- selector:
- matchLabels:
- app: http-backend
- version: v1
- template:
- metadata:
- labels:
- app: http-backend
- version: v1
- spec:
- serviceAccountName: http-backend
- containers:
- - env:
- - name: PATH
- value: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/sbin:/sbin:/opt/go-example
- - name: LANG
- value: zh_CN.UTF-8
- - name: VERSION
- value: v1
- image: ccr.ccs.tencentyun.com/wanpinghui/http-backend:1583552944
- name: http-backend
- ports:
- - containerPort: 8080
- protocol: TCP
- name: http-api
- workingDir: /opt/go-example
- initContainers:
- - image: busybox
- command:
- - sh
- - -c
- - echo 65535 > /proc/sys/net/core/somaxconn
- imagePullPolicy: Always
- name: setsysctl
- securityContext:
- privileged: true
- imagePullSecrets:
- - name: qcloudregistrykey
- - name: tencenthubkey
|