Skip to content

Instantly share code, notes, and snippets.

@knrt10
Created June 5, 2020 21:51
Show Gist options
  • Select an option

  • Save knrt10/cf18e1a95abb20fc4a08fe5c57036ca3 to your computer and use it in GitHub Desktop.

Select an option

Save knrt10/cf18e1a95abb20fc4a08fe5c57036ca3 to your computer and use it in GitHub Desktop.
grpc-cache deployment file
apiVersion: apps/v1
kind: Deployment
metadata:
name: grpc-cache
namespace: grpc-cache
spec:
replicas: 1
selector:
matchLabels:
name: grpc-cache
template:
metadata:
labels:
name: grpc-cache
namespace: grpc-cache
spec:
containers:
- name: grpc-cache
image: knrt10/grpc-cache
ports:
- containerPort: 5001
---
apiVersion: v1
kind: Service
metadata:
name: grpc-cache
namespace: grpc-cache
spec:
type: LoadBalancer
selector:
name: grpc-cache
ports:
- name: grpc
port: 5001
targetPort: 5001
---
apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
name: grpc-cache
namespace: grpc-cache
spec:
rules:
- host: grpc-cache.example.com
http:
paths:
- path: /
backend:
serviceName: grpc-cache
servicePort: 5001
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment