#amazon-web-services #kubernetes #visual-studio-code #redis
Вопрос:
Я пытаюсь подключиться к своему сервису и использовать все зависимости AWS, доступные в кластере EKS. Я могу подключиться, однако, похоже, у меня возникли проблемы с подключением к экземпляру кэша Redis. Это из моего приложения в моей локальной среде разработки.
{«дочерний»:»Клиент карты Redis»,»сообщение»:»Подключение Redis к dev-ivr-redis.xxxxx.0001.xxxx.кэш.amazonaws.com:6379 не удалось — время подключения 192.168.146.62:6379″,»уровень»:»ошибка»,»отметка времени»:»10/13/2021, 5:41:43 ПМ»}
это моя конфигурация запуска
{
"type": "node",
"request": "launch",
"restart": true,
"runtimeExecutable": "nodemon",
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen",
"name": "Card Writer with Kubernetes",
"skipFiles": [
"<node_internals>/**"
],
"preLaunchTask": "bridge-to-kubernetes.compound",
"program": "${workspaceFolder}/ivr-card-data-writer-svc/src/app.ts",
"outFiles": [
"${workspaceFolder}/dist/**/*.js"
],
"envFile": "${workspaceFolder}/ivr-card-data-writer-svc/src/.env",
},
и это моя задача.
{
"label": "bridge-to-kubernetes.resource",
"type": "bridge-to-kubernetes.resource",
"resource": "card-data-write-service",
"resourceType": "service",
"ports": [
3004
],
"targetCluster": "arn:aws:eks:us-region-#:xxxxxx:cluster/dev-eks",
"targetNamespace": "default",
"useKubernetesServiceEnvironmentVariables": false,
"isolateAs": "mylaptop-59af"
},
{
"label": "bridge-to-kubernetes.compound",
"dependsOn": [
"bridge-to-kubernetes.resource",
"npm: build - ivr-card-data-writer-svc"
],
"dependsOrder": "sequence"
}
Я неправильно использую мост? Я гуглил в течение часа или около того, и кажется, что я единственный, у кого есть эта проблема.
Это выход из соединения
Redirecting Kubernetes service card-data-write-service to your machine...
Target cluster: arn:aws:eks:us-region-1:xxxxxx:cluster/dev-eks
Current cluster: arn:aws:eks:us-region-1:xxxxxx:cluster/dev-eks
Target namespace: default
Current namespace: default
Target service name: card-data-write-service
Target service ports: 3004
Isolating service with routing header: mylaptop-59af
Using kubernetes service environment variables: false
Retrieving the current context and credentials...
Validating the credentials to access the cluster...
Validating the requirements to replicate resources locally...
Redirecting traffic from the cluster to your machine...
Waiting for EndpointManager to come up ...
EndpointManager came up successfully.
Routing successfully enabled for service through pod 'mylaptop-card-data-write-deployment-5f9896fc5c-ddzm9' in namespace 'default'.
Waiting for 'mylaptop-card-data-write-deployment-5f9896fc5c-ddzm9' in namespace 'default' to reach running state...
Pod 'mylaptop-card-data-write-deployment-5f9896fc5c-ddzm9' created in namespace 'default'.
Remote agent deployed in container 'card-data-write' in pod 'mylaptop-card-data-write-deployment-5f9896fc5c-ddzm9'.
Preparing to run Bridge To Kubernetes configured as pod default/mylaptop-card-data-write-deployment-5f9896fc5c-ddzm9 ...
Connection established.
Hosts file updated.
Service 'welcome-service' is available on 127.1.1.1:80.
Service 'kubernetes' is available on 127.1.1.2:443.
Service 'ivr-nlb' is available on 127.1.1.3:8443.
Service 'card-data-read-service' is available on 127.1.1.4:80.
Service 'card-data-write-service' is available on 127.1.1.5:80.
Service 'wagering-service' is available on 127.1.1.6:80.
Service 'admin-api-service' is available on 127.1.1.7:80.
Service 'wager-build-service' is available on 127.1.1.8:80.
Container port 3000 is available at localhost:3004.
##################### Environment started. #############################################################
Run C:UsersmylaptopAppDataLocalTemptmp-84166n5qVk4vsd3b.env.cmd in your existing console to also get connected.
Terminal will be reused by tasks, press any key to close it.
> Executing task in folder thetask: npm run build <
> ivr-card-data-writer-svc@1.0.0 build C:UsersmylaptopDocumentsSportechRepositoriesappivr-card-data-writer-svc
> tsc -b .
> ivr-card-data-writer-svc@1.0.0 postbuild C:UsersmylaptopDocumentsSportechRepositoriesappivr-card-data-writer-svc
> cp -R node_modules ../dist/node_modules
Terminal will be reused by tasks, press any key to close it.