k8s-proxy

command module
v0.0.0-...-8a85d6c Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2015 License: Apache-2.0 Imports: 18 Imported by: 0

README

Kubernetes Proxy Circle CI

Provides a way to run a proxy to the Kubernetes API server as well as providing a proxy to running services & pods via their Kubernetes resource names.

You can also set a directory to serve static files from so you can easily create a web app that uses the proxy endpoints. With the popularity of Angular, you can also specify to return /index.html instead of 404s. This makes it easy to use html5mode.

Finally, specify tls-cert & tls-key to listen over TLS with http2 enabled.

Running

Usage:
  k8s-proxy [OPTIONS]

Application Options:
  -p, --port=                   The port to listen on (9090)
  -k, --kubernetes-master=      The URL to the Kubernetes master
  -v, --kubernetes-api-version= The version of the Kubernetes API to use (v1beta2)
      --insecure                Trust all server certificates (false)
  -w, --www=                    Optional directory to serve static files from (.)
      --www-prefix=             Prefix to serve static files on (/)
      --api-prefix=             Prefix to serve Kubernetes API on (/api/)
      --404=                    Page to send on 404 (useful for e.g. Angular html5mode
                                default page)
      --tls-cert=               TLS cert file
      --tls-key=                TLS key file

Help Options:
  -h, --help                    Show this help message

A Docker image (jimmidyson/k8s-proxy) is also provided to make it easy to layer on your own static content.

Kubernetes API URLs

/api/v1beta1/*, /api/v1beta2/*, /api/v1beta3/* URLs are proxied straight through to the specified Kubernetes API server.

Note that the prefix /api can be changed by using the --api-prefix flag.

Pod & service proxying

The Kubernetes API exposes URLs that will proxy requests to services & pods. The format for these is slightly different between v1beta3 & previous versions due to namespace changes.

To proxy to a service use any the following URLs:

/api/v1beta1/proxy/services/<serviceId>/<path>?namespace=<namespace> /api/v1beta2/proxy/services/<serviceId>/<path>?namespace=<namespace> /api/v1beta3/proxy/ns/<namespace>/services/<serviceId>/<path>

To proxy to a pod use any of the following URLs:

/api/v1beta1/proxy/pods/<podId>:<port>/<path>?namespace=<namespace> /api/v1beta2/proxy/pods/<podId>:<port>/<path>?namespace=<namespace> /api/v1beta3/proxy/ns/<namespace>/pods/<podId>:<port>/<path>

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
Godeps
_workspace/src/code.google.com/p/go-uuid/uuid
The uuid package generates and inspects UUIDs.
The uuid package generates and inspects UUIDs.
_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/api
Package api contains the latest (or "internal") version of the Kubernetes API objects.
Package api contains the latest (or "internal") version of the Kubernetes API objects.
_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/api/errors
Package errors provides detailed error types for api field validation.
Package errors provides detailed error types for api field validation.
_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/api/errors/etcd
Package etcd provides conversion of etcd errors to API errors.
Package etcd provides conversion of etcd errors to API errors.
_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/api/latest
Package latest defines the default output serializations that code should use and imports the required schemas.
Package latest defines the default output serializations that code should use and imports the required schemas.
_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/api/meta
Package meta provides functions for retrieving API metadata from objects belonging to the Kubernetes API
Package meta provides functions for retrieving API metadata from objects belonging to the Kubernetes API
_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/api/rest
Package rest defines common logic around changes to Kubernetes resources.
Package rest defines common logic around changes to Kubernetes resources.
_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/api/testapi
Package testapi provides a helper for retrieving the KUBE_API_VERSION environment variable.
Package testapi provides a helper for retrieving the KUBE_API_VERSION environment variable.
_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/api/v1beta1
Package v1beta1 is the v1beta1 version of the API.
Package v1beta1 is the v1beta1 version of the API.
_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/api/v1beta2
Package v1beta2 is the v1beta2 version of the API.
Package v1beta2 is the v1beta2 version of the API.
_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/api/v1beta3
Package v1beta3 is the v1beta3 version of the API.
Package v1beta3 is the v1beta3 version of the API.
_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/api/validation
Package validation has functions for validating the correctness of api objects and explaining what is wrong with them when they aren't valid.
Package validation has functions for validating the correctness of api objects and explaining what is wrong with them when they aren't valid.
_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/auth/user
Package user contains utilities for dealing with simple user exchange in the auth packages.
Package user contains utilities for dealing with simple user exchange in the auth packages.
_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/client
Package client contains the implementation of the client side communication with the Kubernetes master.
Package client contains the implementation of the client side communication with the Kubernetes master.
_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/client/cache
Package cache is a client-side caching mechanism.
Package cache is a client-side caching mechanism.
_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/client/clientcmd
Package clientcmd provides one stop shopping for building a working client from a fixed config, from a .kubeconfig file, from command line flags, or from any merged combination.
Package clientcmd provides one stop shopping for building a working client from a fixed config, from a .kubeconfig file, from command line flags, or from any merged combination.
_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/client/record
Package record has all client logic for recording and reporting events.
Package record has all client logic for recording and reporting events.
_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/conversion
Package conversion provides go object versioning and encoding/decoding mechanisms.
Package conversion provides go object versioning and encoding/decoding mechanisms.
_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/kubectl
Package kubectl is a set of libraries that are used by the kubectl command line tool.
Package kubectl is a set of libraries that are used by the kubectl command line tool.
_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/kubectl/resource
Package resource assists clients in dealing with RESTful objects that match the Kubernetes API conventions.
Package resource assists clients in dealing with RESTful objects that match the Kubernetes API conventions.
_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/labels
Package labels implements a simple label system, parsing and matching selectors with sets of labels.
Package labels implements a simple label system, parsing and matching selectors with sets of labels.
_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/probe
Package probe contains utilities for health probing, as well as health status information.
Package probe contains utilities for health probing, as well as health status information.
_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/runtime
Package runtime includes helper functions for working with API objects that follow the kubernetes API object conventions, which are:
Package runtime includes helper functions for working with API objects that follow the kubernetes API object conventions, which are:
_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/types
Package types implements various generic types used throughout kubernetes.
Package types implements various generic types used throughout kubernetes.
_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/util
Package util implements various utility functions used in both testing and implementation of Kubernetes.
Package util implements various utility functions used in both testing and implementation of Kubernetes.
_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/util/config
Package config provides utility objects for decoupling sources of configuration and the actual configuration state.
Package config provides utility objects for decoupling sources of configuration and the actual configuration state.
_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/util/errors
Package errors implements various utility functions and types around errors.
Package errors implements various utility functions and types around errors.
_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/util/exec
Package exec provides an injectable interface and implementations for running commands.
Package exec provides an injectable interface and implementations for running commands.
_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/util/iptables
Package iptables provides an interface and implementations for running iptables commands.
Package iptables provides an interface and implementations for running iptables commands.
_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/util/mount
Package mount defines an interface to mounting filesystems.
Package mount defines an interface to mounting filesystems.
_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/util/slice
Package slice provides utility methods for common operations on slices.
Package slice provides utility methods for common operations on slices.
_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/util/wait
Package wait provides tools for polling or listening for changes to a condition.
Package wait provides tools for polling or listening for changes to a condition.
_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/version
Package version supplies version information collected at build time to kubernetes components.
Package version supplies version information collected at build time to kubernetes components.
_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/version/verflag
Package verflag defines utility functions to handle command line flags related to version of Kubernetes.
Package verflag defines utility functions to handle command line flags related to version of Kubernetes.
_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/watch
Package watch contains a generic watchable interface, and a fake for testing code that uses the watch interface.
Package watch contains a generic watchable interface, and a fake for testing code that uses the watch interface.
_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/watch/json
Package json implements a simple encoder and decoder for streams of watch events over io.Writer/Readers
Package json implements a simple encoder and decoder for streams of watch events over io.Writer/Readers
_workspace/src/github.com/davecgh/go-spew/spew
Package spew implements a deep pretty printer for Go data structures to aid in debugging.
Package spew implements a deep pretty printer for Go data structures to aid in debugging.
_workspace/src/github.com/emicklei/go-restful
Package restful, a lean package for creating REST-style WebServices without magic.
Package restful, a lean package for creating REST-style WebServices without magic.
_workspace/src/github.com/emicklei/go-restful/swagger
Package swagger implements the structures of the Swagger (https://github.com/wordnik/swagger-core/wiki) specification
Package swagger implements the structures of the Swagger (https://github.com/wordnik/swagger-core/wiki) specification
_workspace/src/github.com/golang/glog
Package glog implements logging analogous to the Google-internal C++ INFO/ERROR/V setup.
Package glog implements logging analogous to the Google-internal C++ INFO/ERROR/V setup.
_workspace/src/github.com/jessevdk/go-flags
Package flags provides an extensive command line option parser.
Package flags provides an extensive command line option parser.
_workspace/src/github.com/spf13/pflag
pflag is a drop-in replacement for Go's flag package, implementing POSIX/GNU-style --flags.
pflag is a drop-in replacement for Go's flag package, implementing POSIX/GNU-style --flags.
_workspace/src/golang.org/x/net/context
Package context defines the Context type, which carries deadlines, cancelation signals, and other request-scoped values across API boundaries and between processes.
Package context defines the Context type, which carries deadlines, cancelation signals, and other request-scoped values across API boundaries and between processes.
_workspace/src/gopkg.in/v2/yaml
Package yaml implements YAML support for the Go language.
Package yaml implements YAML support for the Go language.
_workspace/src/speter.net/go/exp/math/dec/inf
Package inf (type inf.Dec) implements "infinite-precision" decimal arithmetic.
Package inf (type inf.Dec) implements "infinite-precision" decimal arithmetic.

Jump to

Keyboard shortcuts

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