Skip to content

如何配置镜像的端口 #215

@loveheng

Description

@loveheng

我部署了一个redis服务,设置他的端口分别是:containerPort 6379、 servicePort 6379、nodePort 3697。但系统报了一个这样的错误
2017-08-10 10:28:42.256 ERROR 51644 --- [nio-8080-exec-6] org.ku8eye.service.k8s.K8sAPIService : Create service failed, io.fabric8.kubernetes.client.KubernetesClientException: Failure executing: POST at: http://192.168.205.216:8080/api/v1/namespaces/default/services. Message: Service "jkl456" is invalid: spec.ports[0].nodePort: invalid value '3697', Details: provided port is not in the valid range. Received status: Status(apiVersion=v1, code=422, details=StatusDetails(causes=[StatusCause(field=spec.ports[0].nodePort, message=invalid value '3697', Details: provided port is not in the valid range, reason=FieldValueInvalid, additionalProperties={})], kind=Service, name=jkl456, retryAfterSeconds=null, additionalProperties={}), kind=Status, message=Service "jkl456" is invalid: spec.ports[0].nodePort: invalid value '3697', Details: provided port is not in the valid range, metadata=ListMeta(resourceVersion=null, selfLink=null, additionalProperties={}), reason=Invalid, status=Failure, additionalProperties={}).
请问一下咱们的端口如何配置才有效?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions