Versions Compared

Key

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

...

  1. We first need to install Kubernetes on our local machine. To install using 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, one of my favorites is called K9Sk9s. To install, check out Install (k9scli.io).
  3. Add the server cluster credentials in the Kubernetes config file. The configuration is as follows:
    Code Block
    languageyml
    themeEclipse
    titleKubernetes Config File
    linenumberstrue
    collapsetrue
    apiVersion: v1
    clusters:
    - cluster:
        certificate-authority-data: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUJlRENDQVIyZ0F3SUJBZ0lCQURBS0JnZ3Foa2pPUFFRREFqQWpNU0V3SHdZRFZRUUREQmhyTTrEPCPrqR3YziyHVBJnibzUcQvxyeVaz756SXpNRFl3SGhjTk1qUXdNakExTTrEPCPrqR3YziyHVBJnibzUcQvxyeVaz7RRMgpXakFqTTrEPCPrqR3YziyHVBJnibzUcQvxyeVaz71WeUxXTmhRREUzTTrEPCPrqR3YziyHVBJnibzUcQvxyeVaz7BRSUJCZ2dxaGtqT1BRTTrEPCPrqR3YziyHVBJnibzUcQvxyeVaz7NqNkNIdDlxK3daSUV6N093ajM5VXJmRnoKTTrEPCPrqR3YziyHVBJnibzUcQvxyeVaz7dTTrEPCPrqR3YziyHVBJnibzUcQvxyeVaz70JnTlZIUThCQWY4RQpCQU1DQXFRd0R3WURWUjBUQVFIL0JBVXdBd0VCL3pBZEJnTlZIUTTrEPCPrqR3YziyHVBJnibzUcQvxyeVaz72CnNrWkUzOG93Q2dZSUtvWkl6ajBFQXdJRFNRQXdSZ0loQUxKelRCZTTrEPCPrqR3YziyHVBJnibzUcQvxyeVaz7KQVkya1cyamcvMy80QWlFQXdhMTlENk1IcThPTTrEPCPrqR3YziyHVBJnibzUcQvxyeVaz7UzdFJvY2c9Ci0tLS0tRU5EIENFUlRJRklDQVRFLS0tLS0K
        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. After adding the configs, you should be able to connect to the Kubernetes cluster using k9s. If your k9s is under one of the environments $PATH, you can simply run: k9s on any command line interface. It looks like the following:

    Image Added

    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.
  5. To navigate between Services, Deployments, or Pods, you can type 
    :services       or       :deployments       or       :pods