Created
August 10, 2020 11:47
-
-
Save egeneralov/af7a4b64e13e4da6a2e7567822580a14 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
apiVersion: apps/v1 | |
kind: StatefulSet | |
metadata: | |
name: d-1 | |
spec: | |
replicas: 3 | |
selector: | |
matchLabels: | |
app.kubernetes.io/instance: d-1 | |
app.kubernetes.io/name: d-1 | |
serviceName: d-1-headless | |
template: | |
metadata: | |
labels: | |
app.kubernetes.io/instance: d-1 | |
app.kubernetes.io/name: d-1 | |
spec: | |
containers: | |
# - image: egeneralov/hostname:45ffcf58c17a | |
- image: jmalloc/echo-server:latest | |
livenessProbe: | |
failureThreshold: 3 | |
httpGet: | |
path: / | |
port: http | |
scheme: HTTP | |
periodSeconds: 10 | |
successThreshold: 1 | |
timeoutSeconds: 1 | |
name: d-1 | |
ports: | |
- containerPort: 8080 | |
name: http | |
protocol: TCP | |
readinessProbe: | |
failureThreshold: 3 | |
httpGet: | |
path: / | |
port: http | |
scheme: HTTP | |
periodSeconds: 10 | |
successThreshold: 1 | |
timeoutSeconds: 1 | |
resources: | |
limits: | |
cpu: 100m | |
memory: 64Mi | |
requests: | |
cpu: 100m | |
memory: 64Mi | |
terminationGracePeriodSeconds: 1 | |
--- | |
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: d-1 | |
spec: | |
ports: | |
- name: http | |
port: 8090 | |
protocol: TCP | |
targetPort: http | |
selector: | |
app.kubernetes.io/name: d-1 | |
type: ClusterIP | |
--- | |
apiVersion: extensions/v1beta1 | |
kind: Ingress | |
metadata: | |
annotations: | |
kubernetes.io/ingress.class: nginx | |
name: hostname | |
spec: | |
rules: | |
- host: hostname.127.0.0.1.nip.io | |
http: | |
paths: | |
- path: / | |
backend: | |
serviceName: d-1 | |
servicePort: 8090 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment