Giter Club home page Giter Club logo

helm's Introduction

.NET Client for Helm

Build status Build Status

Helm is a package manager for Kubernetes. It allows you to install and use software built for Kubernetes.

This repository contains a C# client for working with Helm.

Getting started

Before you start, add the Helm NuGet package to your project and make sure you've initialized Helm inside your Kubernetes cluster.

Helm uses a Tiller pod deployed in your Kubernetes cluster to manage charts and deployments.

This means that you'll need to locate your Kubernetes cluster and the Tiller pod if you want to interact with it using C#.

Here's how you can do that:

// Open the Kubernetes configuration and connect to the Kubernetes cluster.
// You may have a KUBECONFIG environment variable. If so, you're in luck - that's what we use in this sample app.
// You Kubernetes configuration can also be stored at ~/.kube/config.
var kubeConfig = KubernetesClientConfiguration.BuildConfigFromConfigFile(null, Environment.GetEnvironmentVariable("KUBECONFIG"));
var kubernetes = new Kubernetes(kubeConfig);

// Figure out where Tiller is located. This will return the IP address and port of a pod running Tiller.
// The code assumes you can connect to a pod using it's IP address. That usually means your code is either running inside a pod,
// or you've configured routing to your pod network.
// If that's not the case, you'll need to set up Kubernetes port forwarding.
TillerLocator locator = new TillerLocator(kubernetes);
var endPoint = locator.Locate();

// Connect to Tiller and get the version information
using(var socket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp))
{
    await socket.ConnectAsync(endPoint).ConfigureAwait(false);

    using (NetworkStream stream = new NetworkStream(socket))
    {
        TillerClient client = new TillerClient(stream);
        var version = await client.GetVersionAsync();
    }
}

How it works

The Helm client consists of three blocks:

  • A locator which helps you locate the Tiller pod in a Kubernetes cluster
  • C# code for the Helm protobuf protocol. This protocol defines how messages which are sent to and received from Helm are serialized.
  • A C# implementation of the gRPC protocol. This protocol allows to send and receive serialized messages over HTTP/2.

helm's People

Contributors

qmfrederik avatar dhartl-rms avatar ctaggart avatar towmeykaw avatar yasgupta avatar

Watchers

 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.