本文作者:丁辉
启动阿里云盘sync同步盘
打开 阿里云盘网页 右键打开检查,点击 Console
输入此命令获取值:
1
| JSON.parse(localStorage.getItem("token")).refresh_token
|
K8s Pod Yaml 编写
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
|
apiVersion: apps/v1 kind: StatefulSet metadata: namespace: aliyunpan name: aliyunpan-sync spec: podManagementPolicy: OrderedReady replicas: 1 revisionHistoryLimit: 5 selector: matchLabels: app: aliyunpan-sync serviceName: aliyunpan-sync minReadySeconds: 5 template: metadata: labels: app: aliyunpan-sync spec: terminationGracePeriodSeconds: 5 containers: - name: aliyunpan-sync image: tickstep/aliyunpan-sync:v0.2.7 env: - name: TZ value: "Asia/Shanghai" - name: ALIYUNPAN_PAN_DIR value: "Linux数据同步备份" - name: ALIYUNPAN_SYNC_MODE value: "sync" - name: ALIYUNPAN_REFRESH_TOKEN valueFrom: secretKeyRef: name: aliyunpan-token key: ALIYUNPAN_REFRESH_TOKEN volumeMounts: - name: host-path-volume mountPath: /home/app/data volumes: - name: host-path-volume hostPath: path: /data/backup/aliyunpan - name: secret-volume secret: secretName: aliyunpan-token
|
1
| kubectl apply -f sync.yaml
|