Skip to content
Branch: master
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
..
Failed to load latest commit information.
src
README.md
tcp-echo-20-v2.yaml
tcp-echo-all-v1.yaml
tcp-echo-services.yaml
tcp-echo.yaml

README.md

TCP Echo Service

This sample runs TCP Echo Server as an Istio service. TCP Echo Server allows you to connect to it over TCP and echoes back data sent to it along with a preconfigured prefix.

Usage

To run the TCP Echo Service sample:

  1. Install Istio by following the istio install instructions.

  2. Start the tcp-echo-server service inside the Istio service mesh:

    $ kubectl apply -f <(istioctl kube-inject -f tcp-echo.yaml)
    service/tcp-echo created
    deployment.extensions/tcp-echo created
  3. Test by running the nc command from a busybox container from within the cluster.

    $ kubectl run -i --rm --restart=Never dummy --image=busybox -- sh -c "echo world | nc tcp-echo 9000"
    hello world
    pod "dummy" deleted

    As you observe, sending world on a TCP connection to the server results in the server prepending hello and echoing back with hello world.

  4. To clean up, execute the following command:

    $ kubectl delete -f tcp-echo.yaml
    service "tcp-echo" deleted
    deployment.extensions "tcp-echo" deleted
You can’t perform that action at this time.