Skip to content

Latest commit

 

History

33 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AgentKit Kubernetes Pulumi Provider

Go CI Go Lint Go SAST Docs Visualization License

A Kubernetes deployment provider for AgentKit using Pulumi. Enables cloud-agnostic container deployments across EKS, GKE, AKS, and on-premises clusters.

Features

  • ☁️ Cloud-Agnostic: Same deployment code works across all Kubernetes distributions
  • 🏗️ Pulumi-Based: Infrastructure-as-Code with Go, no YAML required
  • ☸️ Full K8s Support: Deployment, Service, Ingress with TLS
  • 🔧 Configurable: Resource limits, probes, tolerations, node selectors

Supported Platforms

Cloud Kubernetes Service
AWS EKS (Elastic Kubernetes Service)
GCP GKE (Google Kubernetes Engine)
Azure AKS (Azure Kubernetes Service)
On-prem Any Kubernetes cluster

Installation

go get github.com/plexusone/agentkit-k8s-pulumi

Quick Start

package main

import (
    "context"

    "github.com/plexusone/agentkit/deploy"
    _ "github.com/plexusone/agentkit-k8s-pulumi/deploy/providers/kubernetes"
)

func main() {
    ctx := context.Background()

    // Load deployment configuration
    cfg, err := deploy.LoadDeployConfig("deploy.yaml")
    if err != nil {
        panic(err)
    }

    // Get Kubernetes provider (auto-registered via blank import)
    provider, err := deploy.GetProviderByName(deploy.ProviderKubernetes, cfg)
    if err != nil {
        panic(err)
    }
    defer provider.Close()

    // Deploy to Kubernetes
    status, err := provider.Deploy(ctx, cfg)
    if err != nil {
        panic(err)
    }

    fmt.Printf("Deployed to namespace: %s\n", status.Outputs["namespace"])
}

Configuration

deploy.yaml

stack:
  name: my-agent
  project: my-project
  image:
    repository: myorg/myagent
    tag: v1.0.0
  resources:
    cpu: "0.5"
    memory: "512"
    port: 8080
  environment:
    LOG_LEVEL: info

provider: kubernetes

Kubernetes-Specific Options

Set via environment variables or provider extensions:

Option Description Default
KUBECONFIG Path to kubeconfig file ~/.kube/config
KUBERNETES_CONTEXT Kubeconfig context to use Current context
KUBERNETES_NAMESPACE Target namespace default

Provider Extensions

cfg.ProviderOptions = map[string]any{
    "namespace":        "my-agents",
    "serviceType":      "LoadBalancer",
    "replicas":         3,
    "ingressEnabled":   true,
    "ingressHost":      "agent.example.com",
    "ingressClassName": "nginx",
}

Capabilities

Capability Supported
Auto Scaling Yes (HPA)
Custom Domain Yes (Ingress)
HTTPS/TLS Yes (Ingress TLS)
VPC Networking Yes
Secrets Integration Yes (K8s Secrets)
Preview Yes (Pulumi preview)
Rollback Yes (K8s rollback)

Architecture

agentkit-k8s-pulumi/
├── deploy/
│   ├── providers/
│   │   └── kubernetes/
│   │       ├── config.go     # K8s-specific configuration
│   │       ├── init.go       # Provider registration
│   │       └── provider.go   # Provider implementation
│   └── pulumi/
│       └── stack.go          # Pulumi automation API wrapper
└── go.mod

Dependencies

Related Modules

Module Purpose
agentkit Core agent framework
agentkit-aws-pulumi AWS Lightsail provider

License

MIT License

About

A Kubernetes deployment provider for AgentKit using Pulumi. Enables cloud-agnostic container deployments across EKS, GKE, AKS, and on-premises clusters.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Contributors

Languages