DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
  1. DZone
  2. Software Design and Architecture
  3. Cloud Architecture
  4. Klusterkit: An Open Source Toolkit to Simplify Kubernetes Deployments

Klusterkit: An Open Source Toolkit to Simplify Kubernetes Deployments

A new open source offering that makes deploying in an air-gapped environment easier.

Arun Sriraman user avatar by
Arun Sriraman
·
Apr. 24, 19 · Presentation
Like (3)
Save
Tweet
Share
6.09K Views

Join the DZone community and get the full member experience.

Join For Free


Today, we're excited to announce that Platform9 is open-sourcing Klusterkit, a set of three open source tools available under the Apache v2.0 license on GitHub.

Our customers deploy their software on their private data centers that are often air-gapped environments (either for security reasons, or other considerations). These large organizations were looking to take advantage of Kubernetes and modernize their applications, while enabling deployment of these on different data centers that are often not connected to the outside world.

Klusterkit is composed of three independent tools, that can be used separately or in tandem to orchestrate the lifecycle of a production-grade Kubernetes cluster:

  1. etcdadm, a CLI that simplifies operating an etcd cluster
  2. nodeadm, a CLI node administration tool that complements kubeadm by deploying the dependencies that kubeadm requires
  3. cctl, a cluster lifecycle management tool that adopts the Kubernetes community's Cluster API and uses nodeadm and etcdadm to easily deploy and maintain highly-available Kubernetes clusters in on-premises, even air-gapped environments.

The combination of these three tools enables:

  • Easy deployment and operating of a highly-available etcd cluster and Kubernetes control plane in air-gapped, on-premise environments using the Cluster API.
  • Recovering from a failure of the cluster control plane using etcd backup.
  • Ability to package all the artifacts required to deploy Kubernetes in an air-gapped environment.

Klusterkit Features

  • Multi-master (K8s HA) support
  • Deploy and manage secure etcd clusters
  • Works in air-gapped environments
  • Rolling upgrade and rollback capability
  • Flannel (vxlan) CNI backend with plans to support other CNI backends
  • Backup and recovery of etcd clusters from quorum loss
  • Control plane protection from low memory/low cpu conditions

Klusterkit Solution Architecture

For resiliency and simplicity, Klusterkit uses a single file cctl-state.yaml to store metadata of the Kubernetes cluster you build. The cctl CLI can be invoked to orchestrate the lifecycle of a Kubernetes cluster from any machine which contains this state file. The machine could be an operator's laptop or any of the machines that are part of the Kubernetes cluster.

Cctl implements and calls into the upstream community cluster-api interface as a library for CRUD operations on clusters. It uses "ssh-provider," the open-source bare-metal cluster-api provider authored by Platform9, which in-turn, calls etcdadm and nodeadm to perform cluster operations.

How to use Klusterkit and its components:

  1. Each of the three tools can be easily built by calling "go get" as shown below:
    go get -u github.com/platform9/cctl
    go get -u github.com/platform9/nodeadm
    go get -u github.com/kubernetes-sigs/etcdadm

  2. These binaries can then be packaged and copied over to the target machines that need to run a highly-available Kubernetes cluster. Place the nodeadm and etcdadm binaries in the versioned directories:
    cp $GOPATH/bin/nodeadm /var/cache/ssh-provider/nodeadm//
    cp $GOPATH/bin/etcdadm /var/cache/ssh-provider/etcdadm//

  3. If the intention is to orchestrate a Kubernetes cluster on-prem, in an air-gapped environment, nodeadm and etcdadm download command makes it easy to pull down the required dependencies beforehand from a machine with internet connectivity. These downloaded bits (i.e. kubelet and kubelet systemd file, kubeadm binary, CNI binaries, all container images including Kubernetes, keepalived image and systemd file, etcd container image and related configuration files), can then be copied over to the air-gapped hosts along with cctl, nodeadm, and etcdadm. (For more information see wiki).
  4. Once all these pieces are in place, bringing up your first Kubernetes cluster is a couple of commands away:
    • First, create the credentials used for the cluster.
      $GOPATH/bin/cctl create credential --user root --private-key ~/.ssh/id_rsa
    • Then, create a cluster object. Use -help to see a list of supported flags.
      $GOPATH/bin/cctl create cluster --pod-network 192.168.0.0/16 --service-network 192.169.0.0/24
    • Finally, create the first machine in your cluster.
      $GOPATH/bin/cctl create machine --ip $MACHINE_IP --role master
    $GOPATH/bin/cctl create machine --ip $MACHINE_IP --role master
    $GOPATH/bin/cctl create machine --ip $MACHINE_IP --role master
Kubernetes Open source cluster

Published at DZone with permission of Arun Sriraman. See the original article here.

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • Three SQL Keywords in QuestDB for Finding Missing Data
  • Best Practices for Writing Clean and Maintainable Code
  • How to Create a Real-Time Scalable Streaming App Using Apache NiFi, Apache Pulsar, and Apache Flink SQL
  • Problems of Cloud Cost Management: A Socio-Technical Analysis

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends: