This commit is contained in:
Smart-SangGe 2022-08-05 08:33:05 +08:00
parent 4375861d38
commit 7191b4d767
3 changed files with 29 additions and 30 deletions

View File

@ -30,8 +30,7 @@ spec:
image: 'reg.sre.victor-core.top/cobalt-strike/console:1.3.0'
imagePullPolicy: Always
ports:
- name: console
protocol: TCP
- protocol: TCP
containerPort: 4444
volumeMounts:
- name: kube-api-access-zj4cn
@ -64,17 +63,11 @@ spec:
apiVersion: v1
kind: Service
metadata:
labels:
app: console-service
name: console-service
name: console
namespace: sangge
spec:
ports:
- name: 80-4444-tcp
port: 80
protocol: TCP
- port: 4444
targetPort: 4444
selector:
app: console-service
sessionAffinity: None
type: ClusterIP
app: console

13
ingressrouter.yaml Normal file
View File

@ -0,0 +1,13 @@
apiVersion: traefik.containo.us/v1alpha1
kind: IngressRouteTCP
metadata:
name: console-traefik-tcp
namespace: sangge
spec:
entryPoints:
- console
routes:
- match: HostSNI(`*`)
services:
- name: console
port: 4444

View File

@ -8,22 +8,15 @@ metadata:
annotations:
kubenetes.io/ingress.class: traefik
spec:
# rules:
# - host: sangge.sre.victor-core.top
# http:
# paths:
# - path: /
# pathType: Prefix
# backend:
# service:
# name: console
# port:
# number: 4444
entryPoints:
- console-service
routes:
- match: Host('sangge.sre.victor-core.top')
kind: Rule
services:
- name: console
port: 4444
rules:
- host: sangge.sre.victor-core.top
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: console
port:
number: 4444