Last active
March 15, 2022 15:28
-
-
Save kungfoo/e871af2c0bd88d64ae4f8a9889dff84a to your computer and use it in GitHub Desktop.
This file contains hidden or 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: echo-deployment | |
spec: | |
replicas: 3 | |
selector: | |
matchLabels: | |
app: echo-pod | |
template: | |
metadata: | |
labels: | |
app: echo-pod | |
spec: | |
containers: | |
- name: echoheaders | |
image: k8s.gcr.io/echoserver:1.10 | |
imagePullPolicy: IfNotPresent | |
ports: | |
- containerPort: 8080 | |
--- | |
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: echo-service | |
spec: | |
selector: | |
app: echo-pod | |
ports: | |
- name: http | |
protocol: TCP | |
port: 8080 | |
targetPort: 8080 | |
type: LoadBalancer | |
--- | |
apiVersion: networking.k8s.io/v1 | |
kind: Ingress | |
metadata: | |
name: echo-ingress | |
spec: | |
rules: | |
- http: | |
paths: | |
- path: /echo | |
pathType: Prefix | |
backend: | |
service: | |
name: echo-service | |
port: | |
number: 8080 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment