Coder Social home page Coder Social logo

jackzzj / consul-k8s Goto Github PK

View Code? Open in Web Editor NEW

This project forked from hashicorp/consul-k8s

0.0 3.0 0.0 4.38 MB

First-class support for Consul and Kubernetes. Run Consul on Kubernetes, integrate Connect, sync services, and more.

License: Mozilla Public License 2.0

Makefile 1.00% Dockerfile 1.14% Shell 23.56% Go 74.31%

consul-k8s's Introduction

Consul + Kubernetes (consul-k8s)

The consul-k8s binary includes first-class integrations between Consul and Kubernetes. The project encapsulates multiple use cases such as syncing services, injecting Connect sidecars, and more. The Kubernetes integrations with Consul are documented directly on the Consul website. This README will present a basic overview of each use case, but for full documentation please reference the Consul website.

This project is versioned separately from Consul. Supported Consul versions for each feature will be noted below. By versioning this project separately, we can iterate on Kubernetes integrations more quickly and release new versions without forcing Consul users to do a full Consul upgrade.

Features

  • Catalog Sync: Sync Consul services into first-class Kubernetes services and vice versa. This enables Kubernetes to easily access external services and for non-Kubernetes nodes to easily discover and access Kubernetes services. (Requires Consul 1.1+)

Installation

consul-k8s is distributed in multiple forms:

  • The recommended installation method is the official Consul Helm chart. This will automatically configure the Consul and Kubernetes integration to run within an existing Kubernetes cluster.

  • A Docker image hashicorp/consul-k8s is available. This can be used to manually run consul-k8s within a scheduled environment.

  • Raw binaries are available in the HashiCorp releases directory. These can be used to run consul-k8s directly or build custom packages.

Contributing

To build and install consul-k8s locally, Go version 1.11.4+ is required because this repository uses go modules and go 1.11.4 introduced changes to checksumming of modules to correct a symlink problem. You will also need to install the Docker engine:

Clone the repository:

$ git clone https://github.com/hashicorp/consul-k8s.git

To compile the consul-k8s binary for your local machine:

$ make dev

This will compile the consul-k8s binary into bin/consul-k8s as well as your $GOPATH and run the test suite.

Or run the following to generate all binaries:

$ make dist

If you just want to run the tests:

$ make test

Or to run a specific test in the suite:

go test ./... -run SomeTestFunction_name

To create a docker image with your local changes:

$ make dev-docker

Rebasing contributions against master

PRs in this repo are merged using the rebase method. This keeps the git history clean by adding the PR commits to the most recent end of the commit history. It also has the benefit of keeping all the relevant commits for a given PR together, rather than spread throughout the git history based on when the commits were first created.

If the changes in your PR do not conflict with any of the existing code in the project, then Github supports automatic rebasing when the PR is accepted into the code. However, if there are conflicts (there will be a warning on the PR that reads "This branch cannot be rebased due to conflicts"), you will need to manually rebase the branch on master, fixing any conflicts along the way before the code can be merged.

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.