test
This commit is contained in:
@@ -137,6 +137,8 @@ spec:
|
||||
labels:
|
||||
app: traefik
|
||||
spec:
|
||||
hostNetwork: true
|
||||
dnsPolicy: ClusterFirstWithHostNet
|
||||
serviceAccountName: traefik
|
||||
nodeSelector:
|
||||
kubernetes.io/hostname: kevisual # 节点主机名是 kevisual
|
||||
@@ -164,10 +166,13 @@ spec:
|
||||
ports:
|
||||
- name: web
|
||||
containerPort: 80
|
||||
hostPort: 80
|
||||
- name: websecure
|
||||
containerPort: 443
|
||||
hostPort: 443
|
||||
- name: admin
|
||||
containerPort: 8080
|
||||
hostPort: 8080
|
||||
volumeMounts:
|
||||
- name: acme-storage
|
||||
mountPath: /acme
|
||||
@@ -183,21 +188,23 @@ metadata:
|
||||
namespace: traefik
|
||||
spec:
|
||||
type: NodePort
|
||||
externalIPs:
|
||||
- 118.196.32.29
|
||||
selector:
|
||||
app: traefik
|
||||
ports:
|
||||
- name: web
|
||||
port: 80
|
||||
targetPort: 80
|
||||
nodePort: 30080 # 外部通过 30080 访问 HTTP
|
||||
nodePort: 30080
|
||||
- name: websecure
|
||||
port: 443
|
||||
targetPort: 443
|
||||
nodePort: 30443 # 外部通过 30443 访问 HTTPS
|
||||
nodePort: 30443
|
||||
- name: admin
|
||||
port: 8080
|
||||
targetPort: 8080
|
||||
nodePort: 30808 # Dashboard
|
||||
nodePort: 30808
|
||||
---
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: IngressClass
|
||||
|
||||
Reference in New Issue
Block a user