KubeARK Kubernetes CLI Addon for Inline Variable Templating by grant.zukel

KubeARK Kubernetes CLI Addon for Inline Variable Templating

KubeARK Project Link: https://github.com/iDevOpsio/kubeark
Helios Project Link: https://github.com/iDevOpsio/helios-public
Operating Systems: MACOSX, Linux

What is it?
KubeARK is a Kubernetes kubectl CLI extension designed to act as an inline templating engine for dynamic ${VARIABLE} substitution in Kubernetes yaml files.

What problem does it solve?
Scenario: iDevOps.io LLC has an opensource light weight job scheduler project designed to run in Kubernetes integrated with Github oAuth. Typically, you would have to download the yaml file for Helios and paste in the base64 encoded secret variables required to make the Github oAuth. Then you would have to run kubectl apply on the yaml after updating it.

We wanted to eliminate the need for manual steps. Variable substitution in yaml files is a common practice with Kuberentes based CI/CD pipelines. However, kubectl doesn’t have this functionality by default. We wanted to standardize the process and provide a utility that extends kubectl to have variable substitution functionality.

Using KubeARK a user can run a single command and deploy Helios and replace the required secret variables and apply with a single command. That command would look like:

kubeark apply -f"https://raw.githubusercontent.com/iDevOpsio/helios-public/master/helios.yaml" -e"VERSION=1.0.3" -se"GIT_CLIENT_ID={YOUR CLIENT ID}" -se"GIT_CLIENT_SECRET={YOUR SECRET}" -nhelios

* Note there is no space between the argument definition and value. Spaces will break it.

KubeARK allows you to template remotely hosted yaml files without disclosing secret variables in memory. Thus, your secret variable never gets saved anywhere. Once the apply is done the file is cleared from memory.

KubeARK is also designed to work with local yaml files.

How to use it?
  • Step 1. Install KubeARK: bash <(curl -s https://raw.githubusercontent.com/iDevOpsio/kubeark/master/installKubeArk.sh)
  • Step 2. Example command for installing remotely hosted Helios yaml file: kubeark apply -f"https://raw.githubusercontent.com/iDevOpsio/helios-public/master/helios.yaml" -e"VERSION=1.0.3" -se"GIT_CLIENT_ID={YOUR CLIENT ID}" -se"GIT_CLIENT_SECRET={YOUR SECRET}" -nhelios

    • If you want to use Helios as a example install please see the Helios project link which will guide you through setting up the GitHub oAuth for you to get the client_id and client_secret.

      If you have any questions or comments please reach out to iDevOps.io LLC directly via support@idevops.io and we will get back to you within 24 hours, or simply open an issue on one of our repositories.

What We Offer

We offer an expansive DevOps training & placement program to help you break the barrier to entry into the marketplace.

Streamlined Academic Portal

Online Learning

Our program is designed to be completed at your own pace. We recommend approximately 3-5 hours a night.

Academic Training

Industry Standard Partners

Our academics and hands on exercises integrate with industry leaders in IT education.

Job Placement

DevOps Staffing Agency

When you signup with our program we will act at your discretion on your behalf to place you in your first position.