apiVersion: extensions/v1beta1 kind: Ingress metadata: name: topo namespace: blog spec: rules: - host: topo.dalaocarryme.com http: paths: - backend: serviceName: topo servicePort: 80 --- apiVersion: v1 kind: Service metadata: name: topo namespace: blog spec: ports: - name: http port: 80 protocol: TCP targetPort: 80 selector: app: topo sessionAffinity: ClientIP type: ClusterIP --- apiVersion: apps/v1 kind: Deployment metadata: name: topo namespace: blog spec: progressDeadlineSeconds: 600 replicas: 2 revisionHistoryLimit: 10 selector: matchLabels: app: topo strategy: rollingUpdate: maxSurge: 1 maxUnavailable: 1 type: RollingUpdate template: metadata: labels: app: topo spec: containers: - image: reg.qiniu.com/holo-blog/topo:{TAG} imagePullPolicy: IfNotPresent livenessProbe: failureThreshold: 3 httpGet: path: / port: 80 scheme: HTTP initialDelaySeconds: 10 periodSeconds: 2 successThreshold: 1 timeoutSeconds: 2 name: topo ports: - containerPort: 80 name: 80tcp02 protocol: TCP readinessProbe: failureThreshold: 3 httpGet: path: / port: 80 scheme: HTTP initialDelaySeconds: 10 periodSeconds: 2 successThreshold: 2 timeoutSeconds: 2 resources: {} securityContext: allowPrivilegeEscalation: false capabilities: {} privileged: false readOnlyRootFilesystem: false runAsNonRoot: false stdin: true terminationMessagePath: /dev/termination-log terminationMessagePolicy: File tty: true dnsConfig: {} dnsPolicy: ClusterFirst restartPolicy: Always schedulerName: default-scheduler securityContext: {} terminationGracePeriodSeconds: 30