15
适用于 k8s 的 frpc ingress 实现
source link: https://www.dosk.win/2022/08/29/shi-yong-yu-k8s-de-frpc-ingress-shi-xian/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Usage
- 我建立了一个
helm repo
用来快速部署,步骤如下
helm repo add infinity-server https://infinity-server.github.io/dockerset
helm repo update
helm upgrade --install frpc-ingress infinity-server/frpc-ingress
- 现在等待所有东西跑起来就好,需要配置两个
crd
:
- 远端服务器信息,只能有一个的
Config
配置,其他信息酌情补充就好
apiVersion: crds.dosk.host/v1alpha1
kind: FRPCIngress
metadata:
name: common
spec:
kind: Config
config:
- server_port = 7000 # frps 服务器端口
- server_addr = 1.1.1.1 # frps 服务器地址
# - foo = baz
Rule
配置,需要配和Service
一起使用,如果有其他信息补充extraConfig
字段即可:
---
apiVersion: v1
kind: Service
metadata:
name: demo-service
labels:
app: demo-service
spec:
ports:
- port: 53
name: dns
protocol: UDP
- port: 8000
name: http
protocol: TCP
selector:
app: demo-service
---
apiVersion: crds.dosk.host/v1alpha1
kind: FRPCIngress
metadata:
name: demo-service-dns-ingress
spec:
kind: Rule
service:
name: demo-service
port: 53
protocol: UDP
remotePort: 53
---
apiVersion: crds.dosk.host/v1alpha1
kind: FRPCIngress
metadata:
name: demo-service-http-ingress
spec:
kind: Rule
service:
name: demo-service
port: 8000
protocol: TCP
remotePort: 8000
# extraConfig:
# - foo = baz
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK