使用官方/稳定的jenkins Helm release将图表安装在kubernetes上。

values.yaml文件的相应部分中将GCS存储桶用作目标

backup:
  enabled: true
  # Used for label app.kubernetes.io/component
  componentName: "jenkins-backup"
  schedule: "0 2 * * *"
  labels: {}
  annotations: {}
  image:
    repository: "maorfr/kube-tasks"
    tag: "0.2.0"
  extraArgs: []
  # Add existingSecret for AWS credentials
  existingSecret: {}
  env: []
  resources:
    requests:
      memory: 1Gi
      cpu: 1
    limits:
      memory: 1Gi
      cpu: 1
  # Destination to store the backup artifacts
  # Supported cloud storage services: AWS S3, Minio S3, Azure Blob Storage, Google Cloud Storage
  # Additional support can added. Visit this repository for details
  # Ref: https://github.com/maorfr/skbn
  destination: "gs://jenkins-backup-240392409"

但是,当备份作业开始时,我在其日志中得到以下内容:
gs not implemented

编辑:要解决@Maxim在下面的注释中提出的问题, Pane 的描述指示引号不会出现在备份命令中
Pod Template:
  Labels:           <none>
  Service Account:  my-service-account
  Containers:
   jenkins-backup:
    Image:      maorfr/kube-tasks:0.2.0
    Port:       <none>
    Host Port:  <none>
    Command:
      kube-tasks
    Args:
      simple-backup
      -n
      jenkins
      -l
      app.kubernetes.io/instance=my-jenkins
      --container
      jenkins
      --path
      /var/jenkins_home
      --dst
      gs://my-destination-backup-bucket-6266

最佳答案

您应将目标位置中的“ gs” 更改为“gcs” :

destination: "gcs://jenkins-backup-240392409"

但是,您可以在jenkins中使用ThinBackup插件,并且备份很简单。 check this guide for full instructions and walkthrough

关于jenkins - 无法将GCS存储桶用于掌 Helm /基于Kubernetes的服务器,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/59753022/

10-13 02:32