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
  • How to ssh onto BOSH director vm
  • How to access to the postgreSQL DB on BOSH vm

Was this helpful?

  1. PKS RELATED

BOSH Director

How to ssh onto BOSH director vm

  1. Go to "Ops manager UI"

  2. Click on "Bosh Tile"

  3. Go to "Credentials" tab

  4. Click on "Bbr Ssh Credentials" to get the RSA private key

  5. Save the key in ~/.ssh/bbr-ssh.key, remember to replace \n to with newlines

  6. Change the bbr-ssh.key permission: chmod 600 ~/.ssh/bbr-ssh.key

  7. SSH to BOSH vm: ssh bbr@<bosh-DIRECTOR-IP> -i ~/.ssh/bbr.key

  8. sudo -i to get the root privilege

Steps 1 - 4 could be automated by:

  • alias omcli='om -t https://30.0.0.5 -u admin -p '\''xxxxx'\'' -k'

Replace 'xxxxxx' with your opsman password.

  • omcli curl -p /api/v0/deployed/director/credentials/bbr_ssh_credentials

You will get the output similar to the following:

{
  "credential": {
    "type": "rsa_pkey_credentials",
    "value": {
      "private_key_pem": "-----BEGIN RSA PRIVATE KEY-----xxxxxxx-----END RSA PRIVATE KEY-----\n",
      "public_key_pem": "-----BEGIN PUBLIC KEY-----xxxxxxx-----END PUBLIC KEY-----\n"
    }
  }
}

How to access to the postgreSQL DB on BOSH vm

Once you ssh onto the BOSH director vm, you could check the postgreSQL DB by using the following command:

/var/vcap/packages/postgres-9.4/bin/psql -U vcap bosh -h 127.0.0.1

To show all the tables, you could use:

SELECT * FROM pg_catalog.pg_tables;

PreviousPKS BasicsNextBackup and Restore on Ent. PKS with Velero

Last updated 5 years ago

Was this helpful?