traefik ingress grpc

master
JimZhang 2 years ago
parent 664c4b5688
commit 23916c2c99

@ -2,6 +2,8 @@
title = "使用Flink MongoDB CDC跨云同步MongoDB" title = "使用Flink MongoDB CDC跨云同步MongoDB"
date = 2022-08-30 date = 2022-08-30
draft = true draft = true
[taxonomies]
tags=["flink","coding"]
+++ +++
## 前言 ## 前言
## Flink CDC ## Flink CDC

@ -0,0 +1,54 @@
+++
title = "Traefik Ingress发布gRPC服务"
date = 2022-09-01
[taxonomies]
tags=["kubernetes","coding"]
+++
jina框架使用gPRC协议通讯部署到k8s中对外暴露服务需要配置ingress注解。
k3s中默认使用Traefik Ingress参考yaml配置如下
```YAML
---
# Service
apiVersion: v1
kind: Service
metadata:
name: grpc-demo
annotations:
traefik.ingress.kubernetes.io/service.serversscheme: h2c
spec:
ports:
- port: 8080
selector:
app.kubernetes.io/name: grpc-demo
app.kubernetes.io/instance: grpc-demo
type: ClusterIP
---
# Ingress
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
annotations:
ingress.kubernetes.io/protocol: http
labels:
app: grpc-demo
name: grpc-demo
namespace: grpc-namespace
spec:
rules:
- host: grpc.example.org
http:
paths:
- backend:
service:
name: grpc-demo
port:
number: 8080
path: /
pathType: Prefix
```
Loading…
Cancel
Save