Giter VIP home page Giter VIP logo

ctlptl's Introduction

ctlptl

Build Status GoDoc

Want to mess around with Kubernetes, but don't want to spend an ocean on hardware?

Maybe you need a ctlptl.

What is ctlptl?

ctlptl (pronounced "cattle paddle") is a CLI for declaratively setting up local Kubernetes clusters.

Inspired by kubectl and ClusterAPI's clusterctl, you declare your local cluster with YAML and use ctlptl to set it up.

How do I install it?

Homebrew (Mac/Linux)

brew install tilt-dev/tap/ctlptl

Scoop (Windows)

scoop bucket add tilt-dev https://github.com/tilt-dev/scoop-bucket
scoop install ctlptl

Manually (Mac/Linux/Windows)

Download the pre-compiled binaries from the releases page and copy to the desired location.

How do I use it?

ctlptl supports 4 major commands:

  • ctlptl get - see all running clusters
  • ctlptl create cluster [product] - create a cluster and make it the current kubectl context
  • ctlptl apply -f cluster.yaml - ensure a cluster exists, or create one
  • ctlptl delete -f cluster.yaml - delete a cluster and its state

Examples

Docker for Mac: Enable Kubernetes and set 4 CPU

Create:

ctlptl docker-desktop open
ctlptl create cluster docker-desktop --min-cpus=4

or ensure exists:

cat <<EOF | ctlptl apply -f -
apiVersion: ctlptl.dev/v1alpha1
kind: Cluster
product: docker-desktop
minCPUs: 4
EOF

Docker for Mac: Reset and shutdown Kubernetes

ctlptl delete cluster docker-desktop
ctlptl docker-desktop quit

KIND: with a built-in registry

Create:

ctlptl create cluster kind --registry=ctlptl-registry

or ensure exists:

cat <<EOF | ctlptl apply -f -
apiVersion: ctlptl.dev/v1alpha1
kind: Cluster
product: kind
registry: ctlptl-registry
EOF

Minikube: with a built-in registry at Kubernetes v1.18.8

Create:

ctlptl create cluster minikube --registry=ctlptl-registry --kubernetes-version=v1.18.8

or ensure exists:

cat <<EOF | ctlptl apply -f -
apiVersion: ctlptl.dev/v1alpha1
kind: Cluster
product: minikube
registry: ctlptl-registry
kubernetesVersion: v1.18.8
EOF

More

For more details, see:

Why did you make this?

At Tilt, we want to make Kubernetes a nice environment for local dev.

We found ourselves spending too much time helping teams debug misconfigurations in their dev environment.

We wrote docs like Choosing a local dev cluster and example repos like kind-local, minikube-local, and k3d-local to help people get set up.

ctlptl is a culmination of what we've learned.

Features

Current

Future Work

  • K3D
  • Microk8s
  • Allocating Memory
  • Allocating Storage

Community

ctlptl is a work in progress!

We welcome contributions from the Kubernetes community to help make this better.

We expect everyone -- users, contributors, followers, and employees alike -- to abide by our Code of Conduct.

Goals

  • To support common local cluster setup operations, like create, delete, and reset

  • To interoperate well with all local Kubernetes solutions, including docker-desktop, kind, minikube, k3d, or microk8s

  • To connect other resources to a local cluster, like image registries, storage, and CPU/memory

  • To help infra engineers manage a consistent dev environment

  • To encourage standards that enable interop between devtools, lke KEP 1755

Non-Goals

  • ctlptl is NOT a Kubernetes setup approach that competes with kind or minikube, but rather complements these tools.

  • ctlptl is NOT intended to help you setup a remote cluster, or a remote dev sandbox. If you want to declaratively set up prod clusters, check out clusterapi.

Privacy

ctlptl sends anonymized usage statistics, so we can improve it on every platform. Opt out with ctlptl analytics opt out.

License

Copyright 2020 Windmill Engineering

Licensed under the Apache License, Version 2.0

ctlptl's People

Contributors

nicks avatar aisuko avatar dave-b-code avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.