Skip to main content

A dead simple Kubernetes Resources installer

Project description

Kubeler

Simple Kubernetes Resources installer

Dependencies

  • Python >= 3.12

Installation

pip install kubeler

Usage

kubeler install --installer=./examples/installer.yaml

Configuration

You can use your existing K8s manifest files. For a simple setup, just add cmd: [kubectl/helm command] to your manifest file. For example, you can take a look at some examples in the examples directory.

#cmd: kubectl apply -f namespace.yaml
---
kind: Namespace
apiVersion: v1
metadata:
  name: staging
  labels:
    name: staging
---

Then, create an installer YAML file to define your K8s resources. For example:

init:
  cmd: 
    - apt update -y
    - apt upgrade

group:
  name: k8s
  steps:
    - name: cluster
      dir: ./cluster
    - name: cert-manager
      dir: ./cert

Please note that when you create installer.yml, Kubeler will execute commands in order. So, make sure to place dependent resources before any resources that rely on them.

If you have multiple files inside a directory and want to define the execution order, you can list your files in the desired sequence.

...
- name: argocd
    dir: ./tools/argocd
    files:
        - manifest.yaml
        - ingress.yaml

You can also use variables to dynamically insert values into your manifest file.

...
spec:
  ingressClassName: {{ ingress_class }}
  rules:
    - host: {{ host_url }}
      http:
        paths:
          - path: /
            pathType: Prefix
            backend:
              service: 
                name: argocd-server
                port: 
                  name: https

Then, define the variables in installer.yaml.

- name: argocd
    dir: ./tools/argocd
    files:
        - manifest.yaml
        - ingress.yaml
    vars:
        - name: ingress_class
            value: nginx
        - name: host_url
            value: argocd.example.com

You can also reference variables from a previous step using ref..

- name: redis
    dir: ./tools/redis
    vars:
        - name: password
          value: Password01

- name: harbor
    dir: ./tools/harbor
    vars:
        - name: redis_password  
          value: ref.redis.vars.password

Attributes

  • name: Name of the step.
  • dir: Directory where the manifest files reside.
  • files: List of files in the directory that will be executed in order.
  • vars: Variables for dynamic values inside the manifest file.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

kubeler-0.1.1.tar.gz (5.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

kubeler-0.1.1-py3-none-any.whl (6.4 kB view details)

Uploaded Python 3

File details

Details for the file kubeler-0.1.1.tar.gz.

File metadata

  • Download URL: kubeler-0.1.1.tar.gz
  • Upload date:
  • Size: 5.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for kubeler-0.1.1.tar.gz
Algorithm Hash digest
SHA256 e52112281ca101efc3c8a97409dc83fb1b6d8a56db0b354c411c13fb265c710d
MD5 ae8101fc6db81033979f9d4a741b065a
BLAKE2b-256 73214ffe4bc57f95f87962c35b33a9ea8f571f206bab0ec32059eccef9f98171

See more details on using hashes here.

File details

Details for the file kubeler-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: kubeler-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 6.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for kubeler-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4b0e165a8615b630109bccf06d096839e8f87940366961fba4196a1ee1f232a5
MD5 726e181078e4213d561e168ecea93cb3
BLAKE2b-256 78168027375936d94628e0ddda2423ffa5039a2b77c3e0d88f5edbd701dfa97f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page