Skip to content

Instantly share code, notes, and snippets.

@alevz257
Created December 15, 2019 04:49
Show Gist options
  • Save alevz257/ccb0ca55412882cd48d2622144a84f4c to your computer and use it in GitHub Desktop.
Save alevz257/ccb0ca55412882cd48d2622144a84f4c to your computer and use it in GitHub Desktop.
yml deployment & service CICDworkshop
apiVersion: v1
kind: Service
metadata:
name: hello-k8s
spec:
type: LoadBalancer
ports:
- port: 80
targetPort: 8080
selector:
app: hello-k8s
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: hello-k8s
spec:
replicas: 3
strategy:
type: RollingUpdate
rollingUpdate:
maxUnavailable: 2
maxSurge: 2
selector:
matchLabels:
app: hello-k8s
template:
metadata:
labels:
app: hello-k8s
spec:
containers:
- name: hello-k8s
image: CONTAINER_IMAGE
securityContext:
privileged: false
readOnlyRootFilesystem: true
allowPrivilegeEscalation: false
ports:
- containerPort: 8080
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment