Skip to content

Instantly share code, notes, and snippets.

@Insidexa
Created March 20, 2019 18:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Insidexa/9ce6ba6afbe09093e9f6f4b3b8fe101a to your computer and use it in GitHub Desktop.
Save Insidexa/9ce6ba6afbe09093e9f6f4b3b8fe101a to your computer and use it in GitHub Desktop.
k8s
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
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
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