Skip to main content

Easy and Flexible Kubernetes Package Management

Using GitOps or applying manifests via CLI? Anemos has you covered.

Generate, and modify Kubernetes manifests with the flexibility of JavaScript and deploy with confidence through a streamlined workflow.

Why Anemos?

Easy to Use

Single binary tool with simple JavaScript API and rich features

🛠️

Highly Flexible

Modify any part of your Kubernetes manifests programmatically

🔄

GitOps Ready

Integrates with your existing CI/CD pipelines

Define packages easily

Define all your manifests for a package in a single file for easy sharing. Use power of NPM ecosystem for more flexibility.

package.js
function add(builder, options) {
options = options ?? {};

const name = options.name ?? "simple-package";
const namespace = options.namespace ?? "default";
const image = options.image ?? "hashicorp/http-echo:1.0";

// Use template literals for better readability.
builder.addDocument(
name,
`pod.yaml`,
`
apiVersion: "v1"
kind: "Pod"
metadata:
name: ${name}
namespace: ${namespace}
labels:
app: ${name}
spec:
containers:
- name: "echo"
image: "${image}"
args:
- "-text=Hello, Anemos!"
ports:
- name: "http"
containerPort: 5678
protocol: "TCP"
`);

// Use object-oriented approach for better development experience.
builder.addDocument(
name,
`service.yaml`,
{
apiVersion: "v1",
kind: "Service",
metadata: {
name: name,
namespace: namespace
},
spec: {
type: "ClusterIP",
ports: [
{
name: "http",
port: 80,
targetPort: "http",
protocol: "TCP"
}
]
}
});
}

module.exports = {
add
}

Apply with confidence

Apply manifests to your cluster or delete them, seeing the diffs before each operation.

# Apply manifests from URL or local file
anemos apply -y https://anemos.sh/examples/hello-world.js
[09:44:11.880] INFO: Starting to build documents
[09:44:11.881] INFO: Applying actions for step: '2' - Sanitize
[09:44:11.881] INFO: Applying actions for step: '5' - Generate resources
[09:44:11.883] INFO: Applying actions for step: '100' - Apply

Summary of changes:

OP NAMESPACE RESOURCE
A default deployments/anemos-hello-world
A default services/anemos-hello-world

[09:44:11.948] INFO: Successfully applied Kubernetes manifests

Using GitOps?

Use power of JavaScript to generate and edit manifests for all your applications in a single place.

// Build with: `anemos build index.js`
const anemos = require('@ohayocorp/anemos');
const helloWorld = require("https://anemos.sh/examples/hello-world.js");

const builder = new anemos.Builder("1.31", anemos.KubernetesDistribution.Minikube, anemos.EnvironmentType.Development);

helloWorld.add(builder, {
ingress: {
host: "anemos-hello-world.local",
}
});

builder.build();

Modify manifests in any way you want

Modify generated manifests using JavaScript. Useful when you need quick changes or don't want to wait for new features/bug fixes.

const anemos = require('@ohayocorp/anemos');
const helloWorld = require("https://anemos.sh/examples/hello-world.js");

const builder = new anemos.Builder("1.31", anemos.KubernetesDistribution.Minikube, anemos.EnvironmentType.Development);

helloWorld.add(builder);

builder.onStep(anemos.steps.modify, (context) => {
context
.getDocument("anemos-hello-world/deployment.yaml")
.setLabel("deployment-specific-label", "example-deployment");

for (const document of context.getAllDocuments()) {
document.setLabel("label-for-all-documents", "example");
}
});

builder.build();

Can't give up Helm?

Embed Helm charts in your workflows easily and benefit from Anemos' features.

helm.js
const anemos = require('@ohayocorp/anemos');

const builder = new anemos.Builder("1.31", anemos.KubernetesDistribution.Minikube, anemos.EnvironmentType.Development);

// Use YAML strings for Helm values.
builder.addHelmChart(
"https://github.com/crowdsecurity/helm-charts/releases/download/helloworld-0.2.1/helloworld-0.2.1.tgz",
"helloworld",
`
image:
tag: "1.0"
replicaCount: 2
`);

// Use objects for Helm values.
builder.addHelmChart(
"https://charts.softonic.io/charts/hello-world-app-1.2.2.tgz",
"another-helloworld",
{
image: {
tag: "1.0"
},
replicaCount: 2
});

builder.build();

Get Started in Minutes

1️⃣

Install Anemos

Download and install the Anemos CLI on your system.

Installation Guide
2️⃣

Create Your Package

Define your Kubernetes resources using JavaScript.

Basic Tutorial
3️⃣

Deploy to Kubernetes

Apply your package to your cluster with a single command.

Deployment Guide