Skip to content

Instantly share code, notes, and snippets.

@roock
Forked from chukaofili/echo-server.yml
Last active February 17, 2022 05:08
Show Gist options
  • Save roock/26e915450dfcac2a70ed6e44e0c75cde to your computer and use it in GitHub Desktop.
Save roock/26e915450dfcac2a70ed6e44e0c75cde to your computer and use it in GitHub Desktop.
Echo Server Deployment
apiVersion: v1
kind: Namespace
metadata:
name: echoserver
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: echoserver
namespace: echoserver
spec:
replicas: 1
selector:
matchLabels:
app: echoserver
template:
metadata:
labels:
app: echoserver
spec:
containers:
- image: gcr.io/google_containers/echoserver:1.0
imagePullPolicy: Always
name: echoserver
ports:
- containerPort: 8080
---
apiVersion: v1
kind: Service
metadata:
name: echoserver
namespace: echoserver
spec:
ports:
- port: 80
targetPort: 8080
protocol: TCP
selector:
app: echoserver
---
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: echoserver
namespace: echoserver
annotations:
kubernetes.io/ingress.class: "nginx"
spec:
rules:
- host: echo.minikube.local
http:
paths:
- path: /
backend:
serviceName: echoserver
servicePort: 80
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment