Warn [IST0102] (Namespace default) The namespace is not enabled for Istio injection.
Run 'kubectl label namespace default istio-injection=enabled' to enable it,
or 'kubectl label namespace default istio-injection=disabled'
to explicitly mark it as not needing injection
如果问题仍然存在,请参阅下一部分以检查您的问题是否为已知问题。
检查常见问题和解决方案
您可以在以下常见问题和解决方案部分中检查是否有您遇到的问题(按 Cloud Service Mesh 功能分组),以便节省时间:
[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-08-11。"],[],[],null,["# Troubleshoot Cloud Service Mesh step-by-step\n============================================\n\nThis section explains how to troubleshoot and resolve problems when using\nCloud Service Mesh. If you need additional assistance, see\n[Getting support](/service-mesh/v1.19/docs/getting-support).\n\nTroubleshooting steps\n---------------------\n\nFollow these general steps to troubleshoot Cloud Service Mesh:\n\n1. Use the automated configuration validation tools.\n2. Check if you have a common problem with a known solution.\n3. Narrow the scope of the problem.\n4. Review relevant logs and information.\n5. Gather diagnostic logs and seek help.\n\n| **Note:** If you are unable to troubleshoot manually, see [Gather diagnostic logs and seek help](/service-mesh/v1.19/docs/troubleshooting/troubleshoot-collect-logs) for next steps.\n\nUse automated validation tools\n------------------------------\n\nCloud Service Mesh includes automated diagnostic and configuration validation tools\nthat can resolve problems and help you avoid them in the future. The following\nsections explain how to use these tools.\n\n### `istioctl analyze`\n\nThe `istioctl analyze` diagnostic tool can detect common configuration problems.\nInstall `istioctl` using these\n[instructions](/service-mesh/v1.19/docs/downloading-istioctl).\n\n`istioctl analyze` reads a cluster configuration and if it finds a problem,\nprovides informational messages and suggests remedies. It can run against a live\ncluster or a set of local configuration files. It can also run against a\ncombination of the two, allowing you to find problems before you apply changes\nto a cluster. For more information, see\n[Diagnose your Configuration with `istioctl analyze`](https://istio.io/latest/docs/ops/diagnostic-tools/istioctl-analyze).\nFor more information about the errors that `istioctl analyze` detects, see\n[Configuration Analysis Messages](https://istio.io/latest/docs/reference/config/analysis/).\n\n#### Analyze a live cluster\n\nAnalyze a live cluster by using the following command. \n\n```\nistioctl analyze -A\n```\n\nIf `istioctl analyze` detects a problem with your configuration, it will display\na message with helpful information to resolve it, if known. For\nexample, if you made the common mistake to not label your namespace correctly\nto enable Istio sidecar injection, it would generate the following message: \n\n```\nWarn [IST0102] (Namespace default) The namespace is not enabled for Istio injection.\nRun 'kubectl label namespace default istio-injection=enabled' to enable it,\nor 'kubectl label namespace default istio-injection=disabled'\nto explicitly mark it as not needing injection\n```\n\nIf the problem persists, see the next section to check if your problem is\nalready known.\n\nCheck for common problems and solutions\n---------------------------------------\n\nYou can save time by checking if your symptoms match an issue in these common\nproblems and resolutions sections, grouped by Cloud Service Mesh functional\narea:\n\n- [Installation issues](/service-mesh/v1.19/docs/troubleshooting/troubleshoot-installation)\n- [Managed control plane issues](/service-mesh/v1.19/docs/managed/troubleshoot-managed-anthos-service-mesh)\n- [Observability issues](/service-mesh/v1.19/docs/troubleshooting/troubleshoot-observability)\n- [Off-Google Cloud deployment issues](/service-mesh/v1.19/docs/troubleshooting/troubleshoot-off-gcp)\n- [Proxy issues](/service-mesh/v1.19/docs/troubleshooting/troubleshoot-proxy)\n- [Resource issues](/service-mesh/v1.19/docs/troubleshooting/troubleshoot-resources)\n- [Scaling issues](/service-mesh/v1.19/docs/troubleshooting/troubleshoot-scaling)\n- [Security issues](/service-mesh/v1.19/docs/troubleshooting/troubleshoot-security)\n- [Traffic management issues](/service-mesh/v1.19/docs/troubleshooting/troubleshoot-traffic)\n- [Webhook issues](/service-mesh/v1.19/docs/troubleshooting/troubleshoot-webhook)\n- [Sidecar proxies issues](/service-mesh/v1.19/docs/troubleshooting/troubleshoot-sidecar-proxies)\n\nIf this does not resolve your issue, see the next section.\n\nNarrow the scope of the problem\n-------------------------------\n\nCloud Service Mesh consists of several technologies working together, which means\nthat certain types of problems are associated with particular functional areas\nor components. Each of these components generate helpful logs of their own. Before\nyou attempt to manually analyze the volume of information they provide, narrow\nthe scope of your troubleshooting by answering the following questions:\n\n- Does the issue occur within the control plane or the data plane, for example `istiod` or Envoy proxies?\n- In which functional area are you experiencing the issue, for example Networking, Telemetry, Security, etc.?\n- Is there service-mesh wide traffic loss or in a specific deployment?\n- Does the problem appear or worsen due to lack of ability to scale traffic in service mesh?\n- Does the issue cause latency or other performance issues?\n- Can you reproduce the issue on demand?\n- Did the problem begin after a recent configuration change in Istio, GKE, etc.?\n- Is there an increase or spike in traffic within the service mesh?\n- Does this cluster have any noticeable features enabled or non-typical deployments?\n- Do you observe high CPU or memory utilization? If so, what is the expected usaged at scale?\n- Are there quota restrictions to consider?\n\n### View control plane status\n\nThe following commands can help you understand the status of the Cloud Service Mesh control plane:\n\n- `kubectl get pods -n istio-system`\n- `kubectl describe -n istio-system`\n- For all pods in istio-system: `kubectl logs -n istio-system -l istio --all-containers`\n- `istioctl version`\n- `istioctl proxy-status`\n- `kubectl get configmap istio -o yaml && kubectl get configmap istio-sidecar-injector -o yaml`\n- `kubectl top pods -n istio-system`\n\nUse the following commands to understand the scale of the deployment:\n\n- `kubectl get nodes`\n- `kubectl get services --all-namespaces`\n- `kubectl get pods --all-namespaces`\n\nReview relevant logs and information\n------------------------------------\n\nAfter you narrow the scope of the problem, you can focus on certain logs and\ninformation more effectively. To learn about the logs that Cloud Service Mesh\ngenerates and how to interpret the information they contain, see\n[Interpreting Cloud Service Mesh logs](/service-mesh/v1.19/docs/observability/accessing-logs#interpret_anthos_service_mesh_logs)."]]