Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Install Kubernetes by Docker (you might want to use Docker to build images), check out Install and turn on Kubernetes
  2. There are various UI explorers for Kubernetes. Such as k9s, check out Install (k9scli.io).
  3. Add the server cluster credentials in the Kubernetes config file. (In Mac, config file is located in ~/.kube). The configuration is as follows:
    1. Code Block
      languageyml
      apiVersion: v1
      clusters:
      - cluster:
          certificate-authority-data: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUJlRENDQVIyZ0F3SUJBZ0lCQURBS0JnZ3Foa2pPUFFRREFqQWpNU0V3SHdZRFZRUUREQmhyTTNNdGMyVnkKZG1WeUxXTmhRREUzTURjeE56SXpNRFl3SGhjTk1qUXdNakExTWpJek1UUTJXaGNOTXpRd01qQXlNakl6TVRRMgpXakFqTVNFd0h3WURWUVFEREJock0zTXRjMlZ5ZG1WeUxXTmhRREUzTURjeE56SXpNRFl3V1RBVEJnY3Foa2pPClBRSUJCZ2dxaGtqT1BRTUJCd05DQUFSeG5lcFhxd1oxSUNGcXBrcmNqNkNIdDlxK3daSUV6N093ajM5VXJmRnoKTHBBS2tpUzhpS2NIRGNHMTZiazFjaEhzbVdTLzZjV0ptZm5ueEs3cTg2WDNvMEl3UURBT0JnTlZIUThCQWY4RQpCQU1DQXFRd0R3WURWUjBUQVFIL0JBVXdBd0VCL3pBZEJnTlZIUTRFRmdRVUpsRGJlajRVa2IyV0ZVRjBDREd2CnNrWkUzOG93Q2dZSUtvWkl6ajBFQXdJRFNRQXdSZ0loQUxKelRCZTQyZFZtMmtTWUJWQW5TZW05bWw1TSt1NVcKQVkya1cyamcvMy80QWlFQXdhMTlENk1IcThPTS9pMTlSWitXYUxrdkJYV3Uwb1MwWmJCV2UzdFJvY2c9Ci0tLS0tRU5EIENFUlRJRklDQVRFLS0tLS0K
          server: https://127.0.0.1:6445
        name: diaper-server
      contexts:
      - context:
          cluster: diaper-server
          user: <Kubernetes service account name>
        name: diaper-server
      current-context: diaper-server
      kind: Config
      preferences: {}
      users:
      - name: <Kubernetes service account name>
        user:
          token: <Kubernetes service account token>
  4. Connect to the Kubernetes cluster using the command
    1. Code Block
      k9s
  5. then you have
    1. If you don't see all pods running, it is probably because you're viewing a specific namespace. You can simply press '0' to view pods in all namespaces.
    2. To navigate between Services, Deployments, or Pods, you can type 
      :services       or       :deployments       or       :pods
    3. To port-forward a pod, type shift+F.  To view the log, type l. To kill a pod, type ctrl+k.... You can always view these commands by typing ?(question mark).

More k9s Tutorial: derailed/k9s: 🐶 Kubernetes CLI To Manage Your Clusters In Style! (github.com)