404 Not Found
  • Introduction
  • Monitoring related
    • K8s cluster monitoring
    • Monitor Jenkins with G.A.P on K8s cluster
    • Monitoring tools | projects
      • Grafana
      • AlertManager
      • Prometheus
      • Wavefront
  • Logging related
    • BOSH logs
    • How to gather systemd log
    • K8s cluster logging
    • Logging tools | projects
      • vRealize Log Insight
      • Fluentd
      • syslog vs fluentd
  • Having fun with docker
    • Using docker-compose for redmine
    • Customize Fluentd docker image
  • K8S or Apache Mesos
  • K8S Related
    • Main Architecture
      • Master components
        • API Server
        • etcd
        • Controller Manager
        • Kube Scheduler
      • Worker components
        • kubelet
        • kube-proxy
    • K8S Storage
      • Volume Provisioning
      • Understand CSI
      • How to write CSI
      • VMware CNS
      • K8S storage e2e experiment under VMware vSphere
      • Experiment on Persistent Volume Access Mode
      • Design: Storage in Cluster-API architecture
    • K8S Networking
      • Ingress
      • Endpoints
    • K8S Policies
      • Resource Quotas
    • K8S Management Platform
    • K8S Tests Tool
    • K8S Extension
      • CRDs
        • Custom Resources
        • Custom Controllers
        • How to user code-generator
        • K8S Operators
        • Operators Development Tools
          • Kubebuilder
          • Metacontroller
          • Operator SDK
      • Custom API Server
    • K8S Resource CRUD Workflow
    • K8S Garbage Collection
  • K8S CONTROLLER RELATED
    • IsController: true
    • Controller clients
  • PKS RELATED
    • How to Access VMs and Databases related to PKS
    • PKS Basics
    • BOSH Director
    • Backup and Restore on Ent. PKS with Velero
  • CICD RELATED
    • Configure Jenkins to run on K8S
    • Customize Jenkins JNLP slave image
    • Jenkins global shared libs
  • Google Anthos
    • Google Anthos Day from KubeCon 2019 San Diego
    • Migrate for Anthos
    • Config Connector
  • SYSTEM DESIGN RELATED
    • Design Data Intensive Application - Notes
      • RSM
        • Reliability
        • Scalability
      • Data models and Query Languages
      • Storage and Retrieval
    • How Alibaba Ensure K8S Performance At Large Scale
  • Miscellaneous
    • Knative
    • Serverless
    • Service Mesh
    • gRPC
    • Local persistent volumes
    • ownerReferences in K8S
    • File(NAS) vs Block(SAN) vs Object storage
    • KubeVirt
    • Why K8S HA chooses 3 instead of 5..6..7 as the size of masters?
    • goroutine & go channel
    • How to make docker images smaller
Powered by GitBook
On this page

Was this helpful?

  1. PKS RELATED

Backup and Restore on Ent. PKS with Velero

PreviousBOSH DirectorNextConfigure Jenkins to run on K8S

Last updated 5 years ago

Was this helpful?

Stateless Application

I followed the step by step guide from . And wrote down some unexpected workarounds needed.

  • The --plugins flag is required as part of velero-v1.2.0 (This might change in newer release)

velero install --provider aws --bucket velero \
--plugins "velero/velero-plugin-for-aws:v1.0.0" \
--secret-file /home/kubo/velero-test/velero-credentials \
--use-volume-snapshots=false \
--use-restic \
--backup-location-config \
region=minio,s3ForcePathStyle="true",s3Url=http://minio.velero.svc:9000,publicUrl=http://192.168.160.112:9000
  • After the installation of velero, you will find the restic pods are crashing with the following error:

  Normal   Scheduled  11m                 default-scheduler                              Successfully assigned velero/restic-mqfth to 9aeea30f-f08b-47b3-b7aa-ef45f3e800b0
  Normal   Pulled     10m (x5 over 11m)   kubelet, 9aeea30f-f08b-47b3-b7aa-ef45f3e800b0  Container image "velero/velero:v1.2.0" already present on machine
  Normal   Created    10m (x5 over 11m)   kubelet, 9aeea30f-f08b-47b3-b7aa-ef45f3e800b0  Created container
  Warning  Failed     10m (x5 over 11m)   kubelet, 9aeea30f-f08b-47b3-b7aa-ef45f3e800b0  Error: failed to start container "restic": Error response from daemon: linux mounts: path /var/lib/kubelet/pods is mounted on / but it is not a shared or slave mount
  Warning  BackOff    87s (x44 over 11m)  kubelet, 9aeea30f-f08b-47b3-b7aa-ef45f3e800b0  Back-off restarting failed container

That is because the path to pods under enterprise PKS is under /var/vcap/data/kubelet/pods.

What you have to do is to:

  1. kubectl edit ds restic -n velero

  2. Change from

      volumes:
      - hostPath:
          path: /var/lib/kubelet/pods
          type: ""
        name: host-pods

To


      volumes:
      - hostPath:
          path: /var/vcap/data/kubelet/pods
          type: ""
        name: host-pods
this