Created
June 3, 2019 14:41
-
-
Save xvzf/69d8a34e4d53dcbe78d356f5bfd002c2 to your computer and use it in GitHub Desktop.
Whoami demo deployment on k8s (or k3s)
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: whoami-deployment | |
labels: | |
app: whoami | |
spec: | |
replicas: 3 | |
selector: | |
matchLabels: | |
app: whoami | |
template: | |
metadata: | |
labels: | |
app: whoami | |
spec: | |
containers: | |
- name: whoami | |
image: containous/whoami:latest | |
ports: | |
- containerPort: 80 | |
--- | |
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: whoami-service | |
spec: | |
selector: | |
app: whoami | |
ports: | |
- protocol: TCP | |
port: 80 | |
targetPort: 80 | |
--- | |
apiVersion: extensions/v1beta1 | |
kind: Ingress | |
metadata: | |
name: whoami-ingress | |
spec: | |
rules: | |
- host: whoami.172.16.0.160.xip.io | |
http: | |
paths: | |
- path: / | |
backend: | |
serviceName: whoami-service | |
servicePort: 80 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment