k8s中部署nessus

###部署文件###

kind: Deployment
apiVersion: apps/v1
metadata:
  name: nessus
  namespace: nessus
  labels:
    app: nessus
spec:
  replicas: 1
  selector:
    matchLabels:
      app: nessus
  template:
    metadata:
      labels:
        app: nessus
    spec:
      containers:
        - name: nessus
          image: jbreed/nessus
          ports:
            - name: https
              containerPort: 8834
              protocol: TCP
          imagePullPolicy: IfNotPresent
      restartPolicy: Always
kind: Service
apiVersion: v1
metadata:
  name: nessus-svc
  namespace: nessus
  labels:
    app: nessus-svc
spec:
  ports:
    - name: https
      protocol: TCP
      port: 443
      targetPort: 8834
  selector:
    app: nessus
  type: ClusterIP
kind: Ingress
apiVersion: extensions/v1beta1
metadata:
  name: nessus
  namespace: nessus
  annotations:
    kubernetes.io/ingress.class: nginx
    nginx.ingress.kubernetes.io/backend-protocol: HTTPS
spec:
  tls:
    - secretName: nessus-certs
  rules:
    - host: nessus.test.top
      http:
        paths:
          - path: /
            backend:
              serviceName: nessus-svc
              servicePort: 443

你可能感兴趣的:(Kubernetes,nesssus)