'ExternalName' already set, but got error that 'host' should be nil or empty. #5019
Replies: 2 comments
-
🤖 Based on the error message you provided, it seems like you're trying to use the 'ExternalName' type of service in Kubernetes. In Kubernetes, when you set the 'type' of a service to 'ExternalName', the 'clusterIP' is not used and should be set to 'None'. The 'ExternalName' accepts a string value which should be a valid DNS name. This DNS name is then returned as an alias to the original service name. Here's an example of how to use 'ExternalName': apiVersion: v1
kind: Service
metadata:
name: my-service
spec:
type: ExternalName
externalName: my.external-service.example.com In this example, 'my-service' in the 'default' namespace would return the CNAME record 'my.external-service.example.com'. No 'selector' or 'ports' are needed. In your case, you should set 'clusterIP' to 'None' and 'externalName' to your desired DNS name. The 'host' error you're seeing is likely because 'clusterIP' is set to a value other than 'None'. Please note that this information is based on Kubernetes service configuration and not specific to Apollo. If you're trying to configure something specific in Apollo using 'ExternalName', please provide more details so I can give a more accurate answer. SourcesThis response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research. Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant. If you want to continue the conversation, start your reply with @dosu-bot. |
Beta Was this translation helpful? Give feedback.
-
Would you please check the generated yaml? |
Beta Was this translation helpful? Give feedback.
-
I have set 'ExternalName' and set host as a domain name, but got an error :
cannot patch "apollo-service-dev-apollo-configdb" with kind Service: Service "apollo-service-dev-apollo-configdb" is invalid: spec.clusterIP: Forbidden: must be empty for ExternalName services
I cannot understand that where should i set the DNS name
Beta Was this translation helpful? Give feedback.
All reactions