proxy-go

command module
v0.0.0-...-82b7683 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 3, 2021 License: GPL-3.0 Imports: 6 Imported by: 0

README

proxy-go

This is a simple service which takes requests and forwards them inside a K8s cluster (that's the initial goal). The motivation is to avoid doing port forward on every pod and reconnecting each time a pod dies. Relying on the services in front of those pods and, in the end, port forwarding just one pod.

Usage

kubectl port-forward -n <namespace> <proxy-go-pod> 8080:8080

Making a request to a service named echo at / is as follows:

curl http://localhost/echo

If the service is serving on a different port from 80, just add the port like this:

curl http://localhost/echo:<port>

K8s

Basic deployment
apiVersion: apps/v1
kind: Deployment
metadata:
  namespace: default
  name: proxy
spec:
  selector:
    matchLabels:
      app: proxy
  replicas: 1
  template:
    metadata:
      labels:
        app: proxy
    spec:
      containers:
      - image: dlilue/proxy-go
        imagePullPolicy: Always
        name: proxy
        ports:
        - containerPort: 8080

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL