Created
December 15, 2019 04:49
-
-
Save alevz257/ccb0ca55412882cd48d2622144a84f4c to your computer and use it in GitHub Desktop.
yml deployment & service CICDworkshop
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: 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