커스텀 도메인 매핑을 선택하기 전에 클러스터에서 Knative serving 서비스에 액세스하는 방법을 알아보세요.
기본적으로 Knative serving 클러스터에 배포하는 서비스는 nip.io 기본 도메인으로 설정됩니다. 따라서 인그레스 게이트웨이에 권장 이름을 사용하면 서비스를 즉시 테스트하고 추가 구성 없이 요청을 보낼 수 있습니다. 예를 들면 http://{SERVICE_NAME}.{NAMESPACE}.kuberun.{EXTERNAL_IP}.nip.io입니다.
무료 DNS 와일드카드 서비스인 nip.io 도메인을 포함하여 DNS 와일드카드를 사용할 때 요청 안정성과 관련된 문제가 있을 수 있습니다. 이와 달리 테스트에 커스텀 도메인을 설정하고 사용하면 안정성을 높일 수 있습니다.
기본적으로 Knative serving 서비스는 nip.io DNS 와일드 카드 서비스를 사용합니다. 하지만 sslip.io와 같은 다른 서비스를 사용할 수도 있습니다. 다른 DNS 와일드 카드 서비스를 구성하려면 먼저 부하 분산기의 외부 IP 주소를 가져온 다음 해당 IP 주소를 사용하여 DNS 와일드 카드 서비스를 구성해야 합니다.
클러스터의 도메인 구성
Knative serving은 config-domain ConfigMap을 사용하여 배포된 모든 Knative serving 서비스에 사용되는 기본 도메인을 정의합니다. Google Cloud 콘솔 또는 kubectl 명령어를 통해 해당 ConfigMap을 업데이트할 수 있습니다.
콘솔
기본 도메인을 nip.io에서 Google Cloud 콘솔의 DNS 와일드 카드 서비스 중 하나로 변경하려면 다음 단계를 따르세요.
Google Cloud 콘솔에서 Knative serving 도메인 매핑 페이지로 이동합니다.
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["이해하기 어려움","hardToUnderstand","thumb-down"],["잘못된 정보 또는 샘플 코드","incorrectInformationOrSampleCode","thumb-down"],["필요한 정보/샘플이 없음","missingTheInformationSamplesINeed","thumb-down"],["번역 문제","translationIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-09-04(UTC)"],[],[],null,["# Using test domains\n\nLearn how to access the Knative serving services in your cluster for testing\npurposes before you choose to\n[map a custom domain](/kubernetes-engine/enterprise/knative-serving/docs/mapping-custom-domains).\n\nBy default, the services that you deploy to your Knative serving clusters are\nset to the `nip.io` base domain. Therefore, if you use the recommended name for\ningress gateway, you can immediately test your services and send requests\nwithout additional configuration. For example:\n`http://{SERVICE_NAME}.{NAMESPACE}.kuberun.{EXTERNAL_IP}.nip.io`.\n| **Important:** For production, you must [map a custom domain](/kubernetes-engine/enterprise/knative-serving/docs/mapping-custom-domains), which is also required to enable HTTPS and [use automatic TLS certificates](/kubernetes-engine/enterprise/knative-serving/docs/managed-tls).\n\nNote that there can be\n[issues around the reliability of requests](https://en.wikipedia.org/wiki/Wildcard_DNS_record)\nwhen using DNS wildcards, including the [nip.io](http://nip.io/) domain, which\nis a free DNS wildcard service. In contrast, setting up and using a\n[custom domain](/kubernetes-engine/enterprise/knative-serving/docs/mapping-custom-domains) for testing can offer\nincreased reliability.\n\nOptionally, you can also access your services through the\n[external IP address](#externalip).\n\nUsing the `nip.io` test domain\n------------------------------\n\nTo access a service using the default `nip.io` base domain, you can locate the\nURL from within the Google Cloud console or you can construct the URL manually. \n\n### Console\n\n1. In the Google Cloud console, go to the **Knative serving** page.\n\n [Go to Knative serving](https://console.cloud.google.com/kubernetes/run)\n2. In the list, click the service for which you want to obtain the URL.\n\n3. Near the top of the page the **URL** is displayed.\n\n For example: `http://my-service.default.kuberun.11.111.11.111.nip.io`\n\n Where *my-service* is the name of the Knative serving service, *default*\n is the namespace, and *11.111.11.111* is the IP address of your external\n load balancer.\n\n### Manually\n\nTo manually construct the URL to your service, you use the name of the\nservice, the namespace in which that service is running, and the IP address\nof your load balancer: \n\n http://\u003cvar translate=\"no\"\u003eSERVICE\u003c/var\u003e.\u003cvar translate=\"no\"\u003eNAMESPACE\u003c/var\u003e.kuberun.\u003cvar translate=\"no\"\u003eEXTERNAL_IP\u003c/var\u003e.nip.io\n\nReplace:\n\n- \u003cvar translate=\"no\"\u003eSERVICE_NAME\u003c/var\u003e with the name of your service.\n- \u003cvar translate=\"no\"\u003eNAMESPACE\u003c/var\u003e with the namespace where you deployed the service. By default, services are deployed to the `default` namespace.\n- \u003cvar translate=\"no\"\u003eEXTERNAL_IP\u003c/var\u003e with the [external IP address](#external_ip) of your load balancer.\n\nFor example, if you have a service named `hello` in the `default` namespace\nand your external IP address is `12.345.67.890`, the URL might look like:\n\n`http://hello.default.kuberun.12.345.67.890.nip.io`\n\nUsing the external IP address\n-----------------------------\n\nOptionally, you can use the external IP address of your load balancer to access\nyour services through\n[cURL](https://curl.se/docs/manpage.html) commands or by\nmanually configuring an alternative DNS wildcard service.\n\n### Before you begin\n\n- Ensure that your Google Cloud CLI and kubectl command-line tools are installed and\n up-to-date:\n\n - [GKE clusters on Google Cloud](/kubernetes-engine/enterprise/knative-serving/docs/install/on-gcp/command-line-tools)\n - [GKE clusters outside Google Cloud](/kubernetes-engine/enterprise/knative-serving/docs/install/outside-gcp/command-line-tools)\n- You must have at least the\n [*Kubernetes Engine Developer*](/kubernetes-engine/docs/how-to/iam#roles)\n Identity and Access Management role or equivalent permissions.\n\n### Getting the external IP address\n\nWhen your GKE Enterprise cluster is created, the Istio ingress controller\ncreates a Google Cloud Network Load Balancer with a publicly available\nIP address.\n\nTo configure access to your service with cURL or a DNS service, you must first\nobtain the external IP address of the load balancer service: \n\n### Console\n\nTo get the load balancer's external IP address from the Google Cloud console:\n\n1. Go to the GKE page in the Google Cloud console: \n [Go to GKE](https://console.cloud.google.com/kubernetes)\n2. Click **Services and ingress**.\n3. Identify the service that is your cluster's Istio ingress. The service's **Type** will be **External load\n balancer** , and the **Name** will be `istio-ingressgateway`.\n4. Once you've found your cluster's Istio ingress service, copy its **Endpoint** . This will be the IP address without the port number. For example, you might see `00.000.000.000:11` listed as an endpoint, but you only need to copy `00.000.000.000`.\n\n### kubectl\n\nTo obtain the external IP for the Load Balancer, run the following command: \n\n```bash\nkubectl get svc istio-ingressgateway -n ASM-INGRESS-NAMESPACE\n```\n\nReplace \u003cvar translate=\"no\"\u003eASM-INGRESS-NAMESPACE\u003c/var\u003e with the namespace where your\nCloud Service Mesh ingress is located. Specify `istio-system` if you\ninstalled Cloud Service Mesh using its default configuration.\n\nThe resulting output looks similar to the following: \n\n```bash\nNAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S)\nistio-ingressgateway LoadBalancer XX.XX.XXX.XX pending 80:32380/TCP,443:32390/TCP,32400:32400/TCP\n```\n\nwhere the **EXTERNAL-IP** value is your external IP address of the Load\nBalancer.\n\nAfter obtaining the external IP address of your load balancer, you can use it\nto in cURL commands or with a DNS wildcard service to access your\nKnative serving services.\n\n### Using `cURL`\n\nYou can use [cURL](https://curl.se/docs/manpage.html)\ncommands with the default `nip.io` base domain to send requests to\nyour service.\n\nYou specify the external IP address of your load balancer along with\nthe names of your service and namespace in the cURL command: \n\n```bash\ncurl --header 'Host: \u003cvar translate=\"no\"\u003eSERVICE_NAME\u003c/var\u003e.\u003cvar translate=\"no\"\u003eNAMESPACE\u003c/var\u003e.kuberun.\u003cvar translate=\"no\"\u003eEXTERNAL_IP\u003c/var\u003e.nip.io' EXTERNAL_IP\n```\n\nReplace:\n\n- \u003cvar translate=\"no\"\u003eSERVICE_NAME\u003c/var\u003e with the name of your Knative serving service.\n- \u003cvar translate=\"no\"\u003eNAMESPACE\u003c/var\u003e with the namespace in which your service is running.\n- \u003cvar translate=\"no\"\u003eEXTERNAL_IP\u003c/var\u003e with the [external IP address](#external_ip) of your load balancer.\n\nExample:\n\n`curl --header 'Host: my-service.default.kuberun.12.345.67.890.nip.io' http://12.345.67.890`\n\n### Using other DNS wildcard services\n\nBy default, your Knative serving services use the [nip.io](http://nip.io/) DNS\nwildcard service. However, you can choose to use other services like\n[sslip.io](https://sslip.io/). To configure other DNS wildcard services\nyou must first obtain the [external IP address](#external_ip) of your load\nbalancer and then use that IP address to configure the DNS wildcard service.\n\n#### Configuring your cluster's domain\n\nKnative serving uses the `config-domain` ConfigMap to define the base\ndomain for which all your deployed Knative serving services use. You can\nupdate that ConfigMap through the Google Cloud console or with `kubectl` commands. \n\n### Console\n\nTo change the default base domain from `nip.io` to one of the DNS\nwildcard services in the Google Cloud console:\n\n1. Go to the Knative serving **Domain mappings** page in the\n Google Cloud console:\n\n [Go to Domain mappings](https://console.cloud.google.com/kubernetes/run/domains)\n2. Select **Add mapping \\\u003e Add cluster default domain**\n\n3. Select the checkbox next to \"Apply this domain mapping to all\n Knative serving services deployed to this cluster.\"\n\n4. Select your cluster from the drop-down menu.\n\n5. In the **Domain** field, enter the wildcard DNS site you want to use. For\n example: `sslip.io`\n\n### kubectl\n\nTo change the default base domain from `nip.io` to one of the DNS\nwildcard sites, use the command: \n\n```bash\nkubectl patch configmap config-domain --namespace knative-serving --patch \\\n '{\"data\": {\"kuberun.\u003cvar translate=\"no\"\u003eEXTERNAL_IP\u003c/var\u003e.nip.io\": null, \"\u003cvar translate=\"no\"\u003eDNS_SERVICE\u003c/var\u003e\": \"\"}}'\n```\n\nReplace\n\n- \u003cvar translate=\"no\"\u003eEXTERNAL_IP\u003c/var\u003e with the Load Balancer [external IP address](#external_ip).\n- \u003cvar translate=\"no\"\u003eDNS_SERVICE\u003c/var\u003e with the wildcard DNS site you are using. For example: `sslip.io`\n\nYour service is now available at\n`http://{SERVICE_NAME}.{NAMESPACE}.kuberun.{EXTERNAL_IP}.{DNS_SERVICE}`."]]