Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@pathcl
Created April 19, 2019 11:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pathcl/e1fab904e8972790b742ec268fe1f744 to your computer and use it in GitHub Desktop.
Save pathcl/e1fab904e8972790b742ec268fe1f744 to your computer and use it in GitHub Desktop.
helloworld.yaml
---
kind: Deployment
apiVersion: extensions/v1beta1
metadata:
name: whoami
labels:
app: whoami
spec:
replicas: 2
selector:
matchLabels:
app: whoami
task: whoami
template:
metadata:
labels:
app: whoami
task: whoami
spec:
containers:
- name: whoami
image: containous/whoami
resources:
requests:
memory: "1024Mi"
ports:
- containerPort: 80
---
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
generation: 1
name: whoami
namespace: default
spec:
rules:
- host: k8s.lab.ams
http:
paths:
- backend:
serviceName: whoami
servicePort: http
path: /
---
apiVersion: v1
kind: Service
metadata:
annotations:
name: whoami
namespace: default
spec:
ports:
- name: http
port: 80
protocol: TCP
targetPort: 80
selector:
app: whoami
task: whoami
sessionAffinity: None
type: ClusterIP
status:
loadBalancer: {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment