INT 21h

Hi, I am Vladimir Smagin, SysAdmin and Kaptain. Telegram Email / GIT / RSS / GPG

HashiCorp Vault fast start in Kubernetes

№ 11404 В разделе "Sysadmin" от November 2nd, 2021,
В подшивках: , ,

Сразу с персистентностью. Ingress ресурс и storage class поправьте под ваши нужды.

apiVersion: apps/v1
kind: Deployment
metadata:
  name: vault
spec:
  selector:
    matchLabels:
      name: vault
      instance: test
  replicas: 1
  template:
    metadata:
      labels:
        name: vault
        instance: test
    spec:
      containers:
      - name: vault
        image: vault:1.8.4
        command: ["docker-entrypoint.sh","server"]
        ports:
        - name: vault
          containerPort: 8200
        volumeMounts:
        - mountPath: /vault
          name: data
        resources:
          limits:
            cpu: 100m
            memory: 512Mi
          requests:
            cpu: 50m
            memory: 256Mi
        securityContext:
          capabilities:
            add:
              - IPC_LOCK
      volumes:
      - name: data
        persistentVolumeClaim:
          claimName: vault-data
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: vault-data
spec:
  accessModes:
  - ReadWriteOnce
  resources:
    requests:
      storage: 10Gi
  storageClassName: microk8s-hostpath
  volumeMode: Filesystem

---
apiVersion: v1
kind: Service
metadata:
  name: vault
spec:
  ports:
  - port: 80
    targetPort: vault
    protocol: TCP
    name: vault
  selector:
    name: vault
    instance: test
  type: ClusterIP
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  annotations:
    certmanager.k8s.io/cluster-issuer: letsencrypt-prod
    kubernetes.io/ingress.class: nginx
    nginx.ingress.kubernetes.io/proxy-body-size: "0"
  name: vault
spec:
  rules:
  - host: vault.blindage.org
    http:
      paths:
      - backend:
          service:
            name: vault
            port:
              name: vault
        path: /
        pathType: ImplementationSpecific

Нет комментариев »

Leave a Reply

Your email address will not be published. Required fields are marked *

*

Яндекс.Метрика

Fortune cookie: Today's spam: Now you can get generic V-i-@-g-r-a for as low as $2.50 per dose