123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126 |
- ---
- apiVersion: v1
- kind: Service
- metadata:
- labels:
- app: http-endpoint
- service: http-endpoint
- name: http-endpoint
- namespace: prd
- spec:
- ports:
- - name: http
- port: 8080
- protocol: TCP
- targetPort: 8080
- selector:
- app: http-endpoint
- type: ClusterIP
- ---
- apiVersion: v1
- kind: ServiceAccount
- metadata:
- name: http-endpoint
- namespace: prd
- labels:
- account: http-endpoint
- ---
- apiVersion: apps/v1
- kind: Deployment
- metadata:
- labels:
- app: http-endpoint
- version: v1
- name: http-endpoint-v1
- namespace: prd
- spec:
- replicas: 1
- selector:
- matchLabels:
- app: http-endpoint
- version: v1
- template:
- metadata:
- labels:
- app: http-endpoint
- version: v1
- spec:
- serviceAccountName: http-endpoint
- 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-endpoint:1583722708
- name: http-endpoint
- 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
- #---
- #apiVersion: apps/v1
- #kind: Deployment
- #metadata:
- # labels:
- # app: http-endpoint
- # version: v2
- # name: http-endpoint-v2
- # namespace: prd
- #spec:
- # replicas: 1
- # selector:
- # matchLabels:
- # app: http-endpoint
- # version: v2
- # template:
- # metadata:
- # labels:
- # app: http-endpoint
- # version: v2
- # spec:
- # serviceAccountName: http-endpoint
- # 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: v2
- # image: ccr.ccs.tencentyun.com/wanpinghui/http-endpoint:1583722730
- # name: http-endpoint
- # 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
|