Interactions with Cloud Block Store

How to interact with Cloud Block Store via CLI or REST APIs

  1. Interaction from vbos-manager pod

    1. Find vbos-manager pod:
      $ kubectl get po --all-namespaces | grep vbos-manager
      vbos vbos-manager-699bbbbf49-rzb28 2/2 Running 0 3d15h
    2. Enter vbos-manager pod:
      $ kubectl exec -it -nvbos vbos-manager-699bbbbf49-rzb28 -c vbos-manager -- bash
    3. Execute vbosctl binary under root
      root@vbos-manager-699bbbbf49-rzb28:/# ./vbosctl status
      Bucket Usage:
  2. Interaction from an operation node

    1. Expose application with services
    2. NodePort as an example
      $ kubectl get svc | grep vbos-manager
      vbos-manager ClusterIP <none> 80/TCP 37m
      $ kubectl -n vbos patch svc vbos-manager -p '{"spec":{"type":"NodePort"}}'
      service/vbos-manager patched
      $ kubectl get svc | grep vbos-manager
      vbos-manager NodePort <none> 80:31337/TCP 46m
    3. Obtain a copy of vbosctl from vbos-manager pod
      $ kubectl cp -c vbos-manager vbos-manager-699bbbbf49-rzb28:/vbosctl vbosctl
      tar: Removing leading `/' from member names
      $ chmod +x vbosctl
    4. Run vbosctl binary, login with NodePort
      $ ./vbosctl login -u$VBOS-USERNAME -p$VBOS-PASSWD

      # vbosctl credentials saved in yaml after login
      $ cat ~/.vbos.yaml
      Username: xxx
      Token: xxx...
  3. Interaction via REST APIs

    1. With Services exposed, for example via NodePort, visit from a browser.
    2. Configure Ingress to vbos-manager service