Skip to content

Latest commit

 

History

History
67 lines (50 loc) · 2.94 KB

ktunnel_expose.md

File metadata and controls

67 lines (50 loc) · 2.94 KB

ktunnel expose

Expose local machine as a service on the kubernetes cluster

Synopsis

This command would inject a new service and deployment to the cluster, and open the tunnel to the server forwarding tunnel ingress traffic to the the same port on localhost

ktunnel expose [flags] SERVICE_NAME [ports]

Examples


# Expose a local application running on port 8000 via http
ktunnel expose kewlapp 80:8000

ktunnel expose kewlapp 80:8000 -r
                          
# Expose a local redis server
ktunnel expose redis 6379
              

Options

  -c, --ca-file string                   TLS cert auth file
      --cert string                      TLS certificate file
      --context string                   Kubernetes Context
      --deployment-annotations strings   comma separated list of annotations and values seperated by the '=' character (i.e sidecar.istio.io/inject=false)
  -l, --deployment-labels strings        comma separated list of labels and values seperated by the '=' character (i.e app=application,env=prod)
  -d, --deployment-only                  create only deployment
  -f, --force                            deployment & service will be removed before
  -h, --help                             help for expose
      --key string                       TLS key file
  -n, --namespace string                 Namespace (default "default")
  -q, --node-selector-tags strings       tag and value seperated by the '=' character (i.e kubernetes.io/os=linux)
      --pod-tolerations strings          comma separated list of tolerations seperated by the '=' character (i.e key=value:NoSchedule)
      --portname string                  specify container port name
  -r, --reuse                            delete k8s objects before expose
  -s, --scheme string                    Connection scheme (default "tcp")
      --server-cpu-limit int             Server container CPU Limit in milli-cpus (default 500)
      --server-cpu-request int           Server container CPU Request in milli-cpus (default 100)
  -o, --server-host-override string      Server name use to verify the hostname returned by the TLS handshake
  -i, --server-image string              Ktunnel server image to use (default "docker.io/omrieival/ktunnel:v2.0.0")
      --server-memory-limit int          Server container CPU Limit in mega-bytes (default 1000)
      --server-memory-request int        Server container CPU Request in mega-bytes (default 100)
      --service-type string              exposed service type (ClusterIP, NodePort, LoadBalancer or ExternalName) (default "ClusterIP")

Options inherited from parent commands

  -p, --port int   The port to use to establish the tunnel (default 28688)
  -t, --tls        Connection uses tls if true, else plain TCP
  -v, --verbose    verbose mode

SEE ALSO

  • ktunnel - Ktunnel is a network tunneling tool for kubernetes
Auto generated by spf13/cobra on 31-Dec-2024