Created
June 14, 2018 07:43
-
-
Save shyam/17cf6b5d9acd315110ce2ae84d4e953f to your computer and use it in GitHub Desktop.
k8s - test deployment, service and nginx ingress
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/v1beta2 | |
kind: Deployment | |
metadata: | |
name: helloworld-deployment | |
spec: | |
selector: | |
matchLabels: | |
app: helloworld | |
replicas: 4 | |
template: | |
metadata: | |
labels: | |
app: helloworld | |
spec: | |
containers: | |
- name: helloworld | |
image: shyam/helloworld:v1 | |
ports: | |
- containerPort: 8080 | |
--- | |
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: helloworld-svc | |
spec: | |
selector: | |
app: helloworld | |
ports: | |
- name: http | |
protocol: TCP | |
port: 80 | |
targetPort: 8080 |
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: extensions/v1beta1 | |
kind: Ingress | |
metadata: | |
name: helloworld-ingress | |
spec: | |
rules: | |
- host: test-helloworld-svc.testserver.de | |
http: | |
paths: | |
- path: / | |
backend: | |
serviceName: helloworld-svc | |
servicePort: 80 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment