基本框架
This commit is contained in:
37
ansible/files/cloudflare-tunnel/cloudflared.yaml
Normal file
37
ansible/files/cloudflare-tunnel/cloudflared.yaml
Normal file
@@ -0,0 +1,37 @@
|
||||
# docs/03-04-k3s-cloudflare-tunnel-配置接入.md — 替换 TUNNEL_TOKEN 后应用
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: cloudflared-credentials
|
||||
namespace: kube-system
|
||||
type: Opaque
|
||||
stringData:
|
||||
TUNNEL_TOKEN: "<YOUR_TUNNEL_TOKEN>"
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: cloudflared
|
||||
namespace: kube-system
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: cloudflared
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: cloudflared
|
||||
spec:
|
||||
containers:
|
||||
- name: cloudflared
|
||||
image: cloudflare/cloudflared:latest
|
||||
args:
|
||||
- tunnel
|
||||
- run
|
||||
env:
|
||||
- name: TUNNEL_TOKEN
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: cloudflared-credentials
|
||||
key: TUNNEL_TOKEN
|
||||
Reference in New Issue
Block a user