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
  -d, --deployment-only               create only deployment
  -f, --force                         deployment & service will be removed before
  -h, --help                          help for expose
      --key string                    TLS key file
  -l, --deployment-labels strings     comma separated list of labels and values seperated by the '=' character (i.e name=app,env=prod)
  -n, --namespace string              Namespace (default "default")
  -q, --node-selector-tags strings    tag and value seperated by the '=' character (i.e kubernetes.io/os=linux)
      --portname string               specify container port name
  -r, --reuse                         delete k8s objects before expose
  -s, --scheme string                 Connection scheme (default "tcp")
  -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:v1.5.3")
      --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 29-Apr-2023