Skip to content

Kubernetes

Kubernetes

Manage your deployments, pods, configmaps, jobs and other kubernetes resources

Description

Kubernetes integration gives you ability to access many of your kubernetes resources using maira commands. Maira can access kubernetes if maira-agent is running within the cluster (default) or outside the cluster. If running within the cluster, Maira agent helm chart will provision all the access permissions required for the agent. If running outside, you can provide a kubeconfig file that contains the credentials to access the cluster.

Installation

Helm Config

k8s:
  disabled: false
  • disabled tag can be set to true to temporarily disable the service without removing the config

Direct Config

If running in cluster, you only need to enable k8s module and service in maira-agent config file

modules:
  - name: clutch.module.k8s
  - name: maira_io.module.k8s
services:
  - name: clutch.service.k8s
  - name: maira_io.service.k8s

If running outside cluster, add path to kubeconfig files in agent config file or by setting KUBECONFIG environment variable. If neither is provided, the agent will look for kubeconfig in default location, which is $HOME/.kube/config

modules:
  - name: clutch.module.k8s
  - name: maira_io.module.k8s
services:
  - name: clutch.service.k8s
    typed_config:
      "@type": types.google.com/clutch.config.service.k8s.v1.Config
    kubeconfigs:
      - /path/to/kubeconfig
  - name: maira_io.service.k8s
    typed_config:
      "@type": types.google.com/clutch.config.service.k8s.v1.Config
    kubeconfigs:
      - /path/to/kubeconfig

Below is sample configuration for enabling kubernetes integration through Helm Chart Values file