• Stars
    star
    128
  • Rank 281,044 (Top 6 %)
  • Language
    Go
  • License
    Apache License 2.0
  • Created over 4 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

โ›ต A no-frills local development tool for service developers working in Kubernetes

localizer

go.dev reference Generated via Bootstrap Coverage Status

A no-frills local development approach for Kubernetes powered Developer Environments.

Contributing

Please read the CONTRIBUTING.md document for guidelines on developing and contributing changes.

High-level Overview

Tools such as; Telepresence, Skaffold, and others all attempt to solve the problem of getting users used to using Kubernetes. This is a pretty big task given that Kubernetes has a gigantic surface area. From my experience (keyword: my experience), developers have no interest in what platform they are deploying to. All they care about is it's easy to work with and that local development is not complicated or different from what they are used to. I, also, firmly believe that the best dev-tool is a tool that requires no configuration, and is self-explanatory. Which these tools tend... to not be.

Given the above, localizer attempts to solve this problem with a few rules:

  • A kubernetes cluster should be able to be run locally, but applications should be accessible as if they were running "locally" (Note: Only on Linux do containers actually run locally, the rest are VMs pretending)
  • There should be little-to-no DSL to interact with services running in Kubernetes locally.
  • No assurances of code working locally will just "work" in Kubernetes. (Let's face it, what you're running locally will never match your production clusters 100%, and if we need to test Kubernetes manifests/etc we should be deploying things into our local cluster and be used to debugging whatever way you do that).

What does localizer actually do?

Given the context of why this was created, and the constraints listed therein, localizer solves these issues by emulating services running locally. It, essentially, can be considered a fancy wrapper around kubectl port-forward in it's basic operation. Services in a cluster are automatically discovered and tunnels are created. While running an entry will be added to your local dns resolver that will also allow the service to be looked up by its Kubernetes service name. This allows a thin emulation layer of Kubernetes, without the caveats of a real Kubernetes cluster.

Example: PostgreSQL

Let's take an example of having a PostgreSQL pod in the postgres namespace, when localizer is run the postgres service will be found, port 5432 will be forwarded and accessible via localhost:5432 and postgres.postgres[.svc.cluster.local] will be added to /etc/hosts. You could then run psql or some other tooling locally and transparently access resources in your Kubernetes cluster as if they were running outside of the cluster.

Example: Letting services inside of Kubernetes talk to a local service

When running localizer expose <serviceName> your local machine will look for an existing service in your Kubernetes cluster, and if it exists it will create a container that will proxy traffic sent to it to your local machine allowing remote resources to access your local machine as if they were also running locally.

Install localizer

You can install the (OSX/LINUX) binary directly into /usr/local/bin:

$ curl -Ls https://github.com/getoutreach/localizer/releases/download/v1.9.0/localizer_1.9.0_$(uname)_amd64.tar.gz | tar -xzC /usr/local/bin localizer

Or manually download a release from Github Releases and unpack it into your PATH.

How do I run localizer?

Easy, just run the following:

$ sudo -E localizer

This will attempt to proxy all services in Kubernetes to your local machine under their respective ports.

FAQ

Does localizer support Windows?

WSL2 should work, and I'd consider it supported. I wrote most of this on WSL2, but I will likely maintain it on macOS. Outside of WSL? Not currently. PRs are welcome!

License

Apache-2.0

More Repositories

1

adminjs

The backend agnostic administration framework.
JavaScript
701
star
2

epf

A framework for keeping your Ember.js apps in sync.
JavaScript
368
star
3

active_model_serializers-cancan

CanCan support for AMS
Ruby
26
star
4

goql

A GraphQL client package written in Go.
Go
18
star
5

stencil

๐Ÿœ smart templating engine for service development
Go
16
star
6

embedded_associations

Rails gem to give controllers logic to handle embedded associations
Ruby
15
star
7

stacked

An open source icon set of technology logos
CSS
11
star
8

bullhorn-rest

Ruby wrapper for the Bullhorn REST API
Ruby
10
star
9

clientxtsdk

Repo containing source code of the SDK add-on creators use to create Outreach add-ons
TypeScript
9
star
10

devenv

Kubernetes powered developer environments
Go
9
star
11

gobox

A collection of go libraries
Go
9
star
12

devbase

A collection of scripts, makefile, etc that help create microservices
Shell
6
star
13

cjsx2jsx

Convert CJSX files to modern JSX
JavaScript
6
star
14

outreach-platform-sdk

The home of our platform API documentation, example code, and SDK.
Java
6
star
15

extensibility-sdk

Repo containing source code of the SDK add-on creators use to create Outreach applications
TypeScript
6
star
16

jsonnet-libs

Libraries to help simplify Outreach manifests
Jsonnet
5
star
17

actions

Github Actions framework for Go
Go
4
star
18

vcluster-fs-syncer

Disk synchronization for vclusters (https://www.vcluster.com/)
Go
3
star
19

stencil-golang

Template repository for Golang applications
Smarty
3
star
20

launchdarkly-js-extension-sdk

LaunchDarkly browser extension background service worker sdk
TypeScript
3
star
21

stencil-circleci

CircleCI configuration for stencil
Smarty
2
star
22

stencil-template-base

Stencil template repository for template repositories
Smarty
2
star
23

conrad

Ruby
2
star
24

stencil-base

Base templates for a stencil backed service
Smarty
2
star
25

getoutreach.github.io

Github pages site for Outreach Engineering
HTML
1
star
26

epf-website

Website for http://epf.io: Ember.js Persistence Foundation
Ruby
1
star
27

clientxtdocs

Repository containing documentation and samples for client extensibility sdk
1
star
28

threatstack-ruby

Ruby implementation of the Threatstack API
Ruby
1
star
29

broccoli-systemjs-builder

Broccoli system.js filter optimized for incremental rebuilds
JavaScript
1
star
30

adminjs-website

Website for Adminjs.com
JavaScript
1
star