You are viewing documentation for Kubernetes version: v1.20

Kubernetes v1.20 documentation is no longer actively maintained. The version you are currently viewing is a static snapshot. For up-to-date documentation, see the latest version.

TCPSocketAction

TCPSocketAction describes an action based on opening a socket.

import "k8s.io/api/core/v1"

TCPSocketAction describes an action based on opening a socket


  • port (IntOrString), required

    Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME.

    IntOrString is a type that can hold an int32 or a string. When used in JSON or YAML marshalling and unmarshalling, it produces or consumes the inner type. This allows you to have, for example, a JSON field that can accept a name or number.

  • host (string)

    Optional: Host name to connect to, defaults to the pod IP.