Last active
March 11, 2020 06:14
-
-
Save javaadpatel/1953e94b5b1d4352652e44f177d28044 to your computer and use it in GitHub Desktop.
Configuration file for deploying WhoAmI container to Kubernetes cluster using Traefik for routing
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
kind: Deployment | |
apiVersion: extensions/v1beta1 | |
metadata: | |
name: whoami | |
namespace: default | |
labels: | |
app: containous | |
name: whoami | |
spec: | |
replicas: 1 | |
selector: | |
matchLabels: | |
app: containous | |
task: whoami | |
template: | |
metadata: | |
labels: | |
app: containous | |
task: whoami | |
spec: | |
containers: | |
- name: containouswhoami | |
image: containous/whoami | |
ports: | |
- containerPort: 80 | |
--- | |
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: whoami | |
namespace: default | |
spec: | |
ports: | |
- name: http | |
port: 80 | |
selector: | |
app: containous | |
task: whoami | |
--- | |
apiVersion: traefik.containo.us/v1alpha1 | |
kind: IngressRoute | |
metadata: | |
name: whoami-route | |
namespace: default | |
spec: | |
entryPoints: | |
- web | |
- websecure | |
routes: | |
- match: PathPrefix(`/whoami`) | |
kind: Rule | |
services: | |
- name: whoami | |
port: 80 | |
tls: | |
certResolver: le | |
domains: | |
- main: YOURDOMAIN.com | |
sans: | |
- "*.YOURDOMAIN.com" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment