Created
July 15, 2019 13:04
-
-
Save dduportal/b14aa1fd2cdc2b63fae34672532c595c to your computer and use it in GitHub Desktop.
whoami
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
version: '3' | |
services: | |
webapp: | |
image: containous/whoami | |
# Move this directive under the "deploy:" if you are deploying to swarm instead of standalone Docker Engine | |
labels: | |
# Traefik v1 | |
- "traefik.frontend.rule=Host:whoami.localhost" | |
# Traefik v2 | |
- "traefik.http.routers.whoami.rule=Host(`whoami.localhost`)" |
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 | |
spec: | |
replicas: 1 | |
template: | |
metadata: | |
labels: | |
app: whoami | |
spec: | |
containers: | |
- name: whoami | |
image: containous/whoami | |
--- | |
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: whoami | |
labels: | |
app: whoami | |
spec: | |
type: ClusterIP | |
ports: | |
- port: 80 | |
name: whoami | |
selector: | |
app: whoami | |
--- | |
apiVersion: networking.k8s.io/v1beta1 | |
kind: Ingress | |
metadata: | |
name: whoami | |
labels: | |
app: whoami | |
spec: | |
rules: | |
- host: whoami.localhost | |
http: | |
paths: | |
- backend: | |
serviceName: whoami | |
servicePort: 80 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment