Azurite kubernetes ip

Azurite kubernetes ip

azurite我在 K8s 集群中运行kind。当我尝试从另一个 pod 访问它时,我遇到了一个奇怪的问题。

如果我使用服务 DNS 名称,它就会失败,但如果我使用它映射到的集群 IP,它就会工作:

azure-cli-86497c5f6f-lkmsb:/# curl -i http://10.96.90.7:10000^C
azure-cli-86497c5f6f-lkmsb:/# ping azurite.localdev
PING azurite.localdev (10.96.90.7): 56 data bytes
^C
--- azurite.localdev ping statistics ---
2 packets transmitted, 0 packets received, 100% packet loss
azure-cli-86497c5f6f-lkmsb:/# AZURE_STORAGE_CONNECTION_STRING="AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;DefaultEndpointsProtocol=http;BlobEndpoint=http://azurite.localdev:10000/devstoreaccount1;" az storage container list
Unexpected return type <class 'str'> from ContentDecodePolicy.deserialize_from_http_generics.
Bad Request
ErrorCode:None
azure-cli-86497c5f6f-lkmsb:/# AZURE_STORAGE_CONNECTION_STRING="AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;DefaultEndpointsProtocol=http;BlobEndpoint=http://10.96.90.7:10000/devstoreaccount1;" az storage container list
[
  {
    "deleted": null,
    "encryptionScope": null,
    "immutableStorageWithVersioningEnabled": null,
    "metadata": null,
    "name": "morpheus-models-dev",
    "properties": {
      "etag": "\"0x1D42B31BE0A29E0\"",
      "hasImmutabilityPolicy": false,
      "hasLegalHold": false,
      "lastModified": "2023-10-18T15:17:26+00:00",
      "lease": {
        "duration": null,
        "state": "available",
        "status": "unlocked"
      },
      "publicAccess": null
    },
    "version": null
  }
]
azure-cli-86497c5f6f-lkmsb:/# 

我尝试使用 curl 进行调用以了解是否存在任何差异,并且我可以看到以下内容:

azure-cli-86497c5f6f-lkmsb:/# ping azurite.localdev
PING azurite.localdev (10.96.90.7): 56 data bytes
^C
--- azurite.localdev ping statistics ---
1 packets transmitted, 0 packets received, 100% packet loss
azure-cli-86497c5f6f-lkmsb:/# curl -i http://azurite.localdev:10000/devstoreaccount1
HTTP/1.1 400 Bad Request
Server: Azurite-Blob/3.26.0
Date: Thu, 19 Oct 2023 06:38:15 GMT
Connection: keep-alive
Keep-Alive: timeout=5
Content-Length: 0

azure-cli-86497c5f6f-lkmsb:/# curl -i http://10.96.90.7:10000
HTTP/1.1 400 Value for one of the query parameters specified in the request URI is invalid.
Server: Azurite-Blob/3.26.0
x-ms-error-code: InvalidQueryParameterValue
x-ms-request-id: fa311e07-6eee-4b5c-9fe6-9d6e7248d632
content-type: application/xml
Date: Thu, 19 Oct 2023 06:38:25 GMT
Connection: keep-alive
Keep-Alive: timeout=5
Transfer-Encoding: chunked

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Error>
  <Code>InvalidQueryParameterValue</Code>
  <Message>Value for one of the query parameters specified in the request URI is invalid.
RequestId:fa311e07-6eee-4b5c-9fe6-9d6e7248d632
Time:2023-10-19T06:38:25.969Z</Message>
</Error>azure-cli-86497c5f6f-lkmsb:/# 

这怎么可能?kind 网络层有问题吗?

相关内容