Created
September 19, 2018 20:24
-
-
Save bendrucker/fb5cef86e7e2e57604bba7383a2691a2 to your computer and use it in GitHub Desktop.
Hello World deployment + service for Kubernetes
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/v1beta1 | |
kind: Deployment | |
metadata: | |
name: hello-world | |
labels: | |
app: hello-world | |
spec: | |
replicas: 4 | |
template: | |
metadata: | |
labels: | |
app: hello-world | |
spec: | |
containers: | |
- name: hello-app | |
image: 'gcr.io/google-samples/hello-app:1.0' | |
ports: | |
- name: http | |
containerPort: 8080 | |
--- | |
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: hello-world | |
spec: | |
ports: | |
- name: http | |
port: 80 | |
targetPort: http | |
selector: | |
app: hello-world |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment