Created
March 20, 2019 18:56
-
-
Save Insidexa/9ce6ba6afbe09093e9f6f4b3b8fe101a to your computer and use it in GitHub Desktop.
k8s
This file contains 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: Deployment | |
metadata: | |
name: test-ci-cd | |
spec: | |
replicas: 2 | |
strategy: | |
type: RollingUpdate | |
rollingUpdate: | |
maxSurge: 1 | |
maxUnavailable: 1 | |
selector: | |
matchLabels: | |
app: test-ci-cd | |
template: | |
metadata: | |
labels: | |
app: test-ci-cd | |
spec: | |
containers: | |
- name: test-ci-cd | |
image: org/image | |
imagePullPolicy: Always | |
ports: | |
- name: http | |
containerPort: 3000 | |
env: | |
- name: APP_PORT | |
value: "3000" | |
imagePullSecrets: | |
- name: exampleregistrykey |
This file contains 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: extensions/v1beta1 | |
kind: Ingress | |
metadata: | |
name: ingress-tutorial | |
annotations: | |
nginx.ingress.kubernetes.io/rewrite-target: / | |
spec: | |
backend: | |
serviceName: default-http-backend | |
servicePort: 80 | |
rules: | |
- host: domain-name.pp.ua | |
http: | |
paths: | |
- path: / | |
backend: | |
serviceName: test-ci-cd | |
servicePort: 8080 |
This file contains 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: v1 | |
kind: Service | |
metadata: | |
name: test-ci-cd | |
labels: | |
app: test-ci-cd | |
spec: | |
type: NodePort | |
selector: | |
app: test-ci-cd | |
ports: | |
- port: 8080 | |
targetPort: 3000 | |
externalIPs: | |
- 92.60.05.18 # for example port |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment