Initial commit: k3s deployment configurations
This commit is contained in:
28
k3s/my-blog/03-ingress.yaml
Normal file
28
k3s/my-blog/03-ingress.yaml
Normal file
@@ -0,0 +1,28 @@
|
||||
# 03-ingress.yaml
|
||||
|
||||
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: wordpress-ingress
|
||||
namespace: demo-space
|
||||
annotations:
|
||||
# ▼▼▼ 关键注解:我要申请证书 ▼▼▼
|
||||
cert-manager.io/cluster-issuer: letsencrypt-prod
|
||||
spec:
|
||||
rules:
|
||||
- host: blog.u9.net3w.com # 您的域名
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: wordpress-service
|
||||
port:
|
||||
number: 80
|
||||
# ▼▼▼ 关键配置:证书存放在这个 Secret 里 ▼▼▼
|
||||
tls:
|
||||
- hosts:
|
||||
- blog.u9.net3w.com
|
||||
secretName: blog-tls-secret # K3s 会自动创建这个 secret 并填入证书
|
||||
Reference in New Issue
Block a user