Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- apiVersion: apps/v1
- kind: Deployment
- metadata:
- name: apple
- namespace: default
- labels:
- app: appledeployment
- spec:
- progressDeadlineSeconds: 600
- replicas: 1
- revisionHistoryLimit: 10
- selector:
- matchLabels:
- app: apple
- strategy:
- rollingUpdate:
- maxSurge: 25%
- maxUnavailable: 25%
- type: RollingUpdate
- template:
- metadata:
- labels:
- app: apple
- spec:
- containers:
- - image: wormhit/nginx-test-static:2.0
- name: apple
- imagePullPolicy: IfNotPresent
- lifecycle:
- preStop:
- exec:
- command:
- - /bin/sh
- - -c
- - sleep 5; /usr/local/openresty/nginx/sbin/nginx -c /etc/nginx/nginx.conf
- -s quit; while pgrep -x nginx; do sleep 1; done
- livenessProbe:
- failureThreshold: 3
- httpGet:
- path: /
- port: 80
- scheme: HTTP
- initialDelaySeconds: 15
- periodSeconds: 30
- successThreshold: 1
- timeoutSeconds: 1
- readinessProbe:
- failureThreshold: 3
- httpGet:
- path: /
- port: 80
- scheme: HTTP
- initialDelaySeconds: 5
- periodSeconds: 30
- successThreshold: 1
- timeoutSeconds: 1
- startupProbe:
- failureThreshold: 3
- httpGet:
- path: /
- port: 80
- scheme: HTTP
- periodSeconds: 5
- successThreshold: 1
- timeoutSeconds: 1
- ports:
- - containerPort: 80
- name: http
- protocol: TCP
- resources: {}
- dnsPolicy: ClusterFirst
- restartPolicy: Always
- schedulerName: default-scheduler
- securityContext: {}
- terminationGracePeriodSeconds: 30
- ---
- apiVersion: v1
- kind: Service
- metadata:
- name: apple
- namespace: default
- labels:
- app: appleservice
- spec:
- type: NodePort
- ports:
- - name: http
- port: 80
- selector:
- app: apple
- ---
- apiVersion: networking.k8s.io/v1
- kind: Ingress
- metadata:
- name: apple
- namespace: default
- annotations:
- kubernetes.io/ingress.class: "traefik"
- spec:
- rules:
- - host: "andrejs.apple.dev"
- http:
- paths:
- - path: /
- pathType: Prefix
- backend:
- service:
- name: apple
- port:
- number: 80
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement