Class ContainerPort.Builder

    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • number

        @Stability(Stable)
        public ContainerPort.Builder number​(Number number)
        Sets the value of ContainerPort.getNumber()
        Parameters:
        number - Number of port to expose on the pod's IP address. This parameter is required. This must be a valid port number, 0 < x < 65536.
        Returns:
        this
      • hostPort

        @Stability(Stable)
        public ContainerPort.Builder hostPort​(Number hostPort)
        Sets the value of ContainerPort.getHostPort()
        Parameters:
        hostPort - Number of port to expose on the host. If specified, this must be a valid port number, 0 < x < 65536. Most containers do not need this.
        Returns:
        this
      • name

        @Stability(Stable)
        public ContainerPort.Builder name​(String name)
        Sets the value of ContainerPort.getName()
        Parameters:
        name - If specified, this must be an IANA_SVC_NAME and unique within the pod. Each named port in a pod must have a unique name. Name for the port that can be referred to by services.
        Returns:
        this