Unable to use GCS bucket for helm/based kubernetes

1/15/2020

Using official / stable jenkins helm release to install the chart on kubernetes.

Using a GCS bucket as destination in the corresponding section of the values.yaml file

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"

However, when the backup job starts, I get the following in its logs:

gs not implemented

edit: To address the issue raised by @Maxim in a comment below, the pod's description indicates that the quotes do not end up in the backup command

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
-- pkaramol
google-cloud-storage
jenkins
kubernetes
kubernetes-helm

1 Answer

1/21/2020

you should change the "gs" in destination to "gcs":

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

however you can use ThinBackup plugin in jenkins and the backup is straighforward. check this guide for full instructions and walkthrough.

-- Methkal Khalawi
Source: StackOverflow