test
This commit is contained in:
parent
d49e5507f1
commit
f2d06c7161
@ -50,6 +50,7 @@ docker_deploy:
|
|||||||
entrypoint: [""]
|
entrypoint: [""]
|
||||||
script:
|
script:
|
||||||
# - kubectl run console-${POD_VERSION} --image=reg.sre.victor-core.top/cobalt-strike/console:${PACKAGE_VERSION} --kubeconfig=.kube/config --certificate-authority=.kube/ca.pem
|
# - kubectl run console-${POD_VERSION} --image=reg.sre.victor-core.top/cobalt-strike/console:${PACKAGE_VERSION} --kubeconfig=.kube/config --certificate-authority=.kube/ca.pem
|
||||||
|
- kubectl apply -f traefik-config.yaml
|
||||||
- kubectl apply -f deploy.yaml
|
- kubectl apply -f deploy.yaml
|
||||||
tags:
|
tags:
|
||||||
- cluster
|
- cluster
|
62
deploy.yaml
62
deploy.yaml
@ -1,12 +1,60 @@
|
|||||||
apiVersion: apps/v1
|
kind: Pod
|
||||||
kind: Deployment
|
apiVersion: v1
|
||||||
metadata:
|
metadata:
|
||||||
name: console
|
name: console
|
||||||
|
namespace: sangge
|
||||||
labels:
|
labels:
|
||||||
app: console
|
app: console
|
||||||
sepc:
|
spec:
|
||||||
|
volumes:
|
||||||
|
- name: kube-api-access-zj4cn
|
||||||
|
projected:
|
||||||
|
sources:
|
||||||
|
- serviceAccountToken:
|
||||||
|
expirationSeconds: 3607
|
||||||
|
path: token
|
||||||
|
- configMap:
|
||||||
|
name: kube-root-ca.crt
|
||||||
|
items:
|
||||||
|
- key: ca.crt
|
||||||
|
path: ca.crt
|
||||||
|
- downwardAPI:
|
||||||
|
items:
|
||||||
|
- path: namespace
|
||||||
|
fieldRef:
|
||||||
|
apiVersion: v1
|
||||||
|
fieldPath: metadata.namespace
|
||||||
|
defaultMode: 420
|
||||||
containers:
|
containers:
|
||||||
- name: console
|
- name: container-ezl95t
|
||||||
image: reg.sre.victor-core.top/cobalt-strike/console:1.3.0
|
image: 'reg.sre.victor-core.top/cobalt-strike/console:1.3.0'
|
||||||
ports:
|
resources:
|
||||||
- containerPort: 4444
|
requests:
|
||||||
|
cpu: 10m
|
||||||
|
volumeMounts:
|
||||||
|
- name: kube-api-access-zj4cn
|
||||||
|
readOnly: true
|
||||||
|
mountPath: /var/run/secrets/kubernetes.io/serviceaccount
|
||||||
|
terminationMessagePath: /dev/termination-log
|
||||||
|
terminationMessagePolicy: File
|
||||||
|
imagePullPolicy: IfNotPresent
|
||||||
|
restartPolicy: Always
|
||||||
|
terminationGracePeriodSeconds: 30
|
||||||
|
dnsPolicy: ClusterFirst
|
||||||
|
serviceAccountName: default
|
||||||
|
serviceAccount: default
|
||||||
|
nodeName: 172.22.161.246
|
||||||
|
securityContext: {}
|
||||||
|
schedulerName: default-scheduler
|
||||||
|
tolerations:
|
||||||
|
- key: node.kubernetes.io/not-ready
|
||||||
|
operator: Exists
|
||||||
|
effect: NoExecute
|
||||||
|
tolerationSeconds: 300
|
||||||
|
- key: node.kubernetes.io/unreachable
|
||||||
|
operator: Exists
|
||||||
|
effect: NoExecute
|
||||||
|
tolerationSeconds: 300
|
||||||
|
priority: 0
|
||||||
|
enableServiceLinks: true
|
||||||
|
preemptionPolicy: PreemptLowerPriority
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
from golang:latest
|
from golang:latest
|
||||||
copy . /go
|
copy . /go
|
||||||
run go build -o console console.go
|
run go build -o console console.go
|
||||||
|
expose 4444
|
||||||
entrypoint ./console
|
entrypoint ./console
|
21
traefik-config.yaml
Normal file
21
traefik-config.yaml
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
apiVersion: networking.k8s.io/v1
|
||||||
|
kind: Ingress
|
||||||
|
metadata:
|
||||||
|
name: console
|
||||||
|
namespace: sangge
|
||||||
|
labels:
|
||||||
|
app: console
|
||||||
|
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
|
Loading…
x
Reference in New Issue
Block a user