Hello, recieve this error while using kubernetes a...
# infisical-help
k
Hello, recieve this error while using kubernetes auth. Seems it doesnt recognize api.crc.testing.
Copy code
infisical-backend-new  | {"level":30,"time":1780000315793,"pid":1,"hostname":"487ca8d3334c","reqId":"req-OxnqvICGKhGkPw","severity":"INFO","host":"<https://api.crc.testing:6443>","msg":"tokenReviewCallbackRaw: Processing kubernetes token review using raw API"}
infisical-backend-new  | {"level":50,"time":1780000315801,"pid":1,"hostname":"487ca8d3334c","reqId":"req-OxnqvICGKhGkPw","severity":"ERROR","err":{"message":"getaddrinfo ENOTFOUND api.crc.testing: getaddrinfo ENOTFOUND api.crc.testing","name":"Error","stack":"Error: getaddrinfo ENOTFOUND api.crc.testing\n    at AxiosError.from (file:///backend/node_modules/axios/lib/core/AxiosError.js:92:14)\n    at RedirectableRequest.handleRequestError (file:///backend/node_modules/axios/lib/adapters/http.js:620:25)\n    at RedirectableRequest.emit (node:events:536:35)\n    at RedirectableRequest.emit (node:domain:489:12)\n    at eventHandlers.<computed> (/backend/node_modules/follow-redirects/index.js:38:24)\n    at ClientRequest.emit (node:events:524:28)\n    at ClientRequest.emit (node:domain:489:12)\n    at emitErrorEvent (node:_http_client:101:11)\n    at TLSSocket.socketErrorListener (node:_http_client:504:5)\n    at TLSSocket.emit (node:events:524:28)\n    at Axios.request (file:///backend/node_modules/axios/lib/core/Axios.js:45:41)\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n    at async tokenReviewCallbackRaw (/backend/src/services/identity-kubernetes-auth/identity-kubernetes-auth-service.ts:181:19)\n    at async Object.login (/backend/src/services/identity-kubernetes-auth/identity-kubernetes-auth-service.ts:317:11)\n    at async Object.handler (/backend/src/server/routes/v1/identity-kubernetes-auth-router.ts:60:9)\ncaused by: Error: getaddrinfo ENOTFOUND api.crc.testing\n    at GetAddrInfoReqWrap.onlookupall [as oncomplete] (node:dns:120:26)\n    at GetAddrInfoReqWrap.callbackTrampoline (node:internal/async_hooks:130:17)","config":"[Redacted]","code":"ENOTFOUND"},"msg":"getaddrinfo ENOTFOUND api.crc.testing"}
infisical-backend-new  | {"level":30,"time":1780000315802,"pid":1,"hostname":"487ca8d3334c","reqId":"req-OxnqvICGKhGkPw","severity":"INFO","res":{"statusCode":500},"responseTime":41.46467300015502,"msg":"request completed"}
✅ 1
p
Hi @kjohnson Sorry for the inconvenience. I will take a look further into this and get back to you as soon as possible.
k
ok thanks
p
Hi @kjohnson, Thank you for your patience while I looked into this. I ran some tests yesterday and have a couple of questions for you. Are you running Infisical inside Docker, or is it running directly on your machine? If you are running Infisical inside Docker, the error is likely caused by the instance being unable to resolve the
api.crc.testing
host, as it may not be on the same network. If that is the case, you can set the environment variable
ALLOW_INTERNAL_IP_CONNECTIONS
to
true
to allow your instance to make outbound requests. Please let me know if this helps, or if you have any additional questions!
k
Hey, that is already set
p
The crc is running locally right? Can you try to change the host to be `host.docker.internal`and try again?
k
yes it is running locally
Change the host what do you mean? In the docker compose of infisical to add 'host.docker.internal'
p
k
ok
So seem something changed now getting a self sign error. The crc has a self sign cert on it. How would I tell infisical to accept it?
Already added it to kube auth identity
Copy code
{
  "level": 50,
  "time": 1780582466323,
  "pid": 1,
  "hostname": "dc98f77e70d3",
  "reqId": "req-2HkujDuSgj51i4",
  "severity": "ERROR",
  "err": {
    "message": "self-signed certificate in certificate chain: self-signed certificate in certificate chain",
    "name": "Error",
    "stack": "Error: self-signed certificate in certificate chain\n    at AxiosError.from (file:///backend/node_modules/axios/lib/core/AxiosError.js:92:14)\n    at RedirectableRequest.handleRequestError (file:///backend/node_modules/axios/lib/adapters/http.js:620:25)\n    at RedirectableRequest.emit (node:events:536:35)\n    at RedirectableRequest.emit (node:domain:489:12)\n    at eventHandlers.<computed> (/backend/node_modules/follow-redirects/index.js:38:24)\n    at ClientRequest.emit (node:events:524:28)\n    at ClientRequest.emit (node:domain:489:12)\n    at emitErrorEvent (node:_http_client:101:11)\n    at TLSSocket.socketErrorListener (node:_http_client:504:5)\n    at TLSSocket.emit (node:events:524:28)\n    at Axios.request (file:///backend/node_modules/axios/lib/core/Axios.js:45:41)\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n    at async tokenReviewCallbackRaw (/backend/src/services/identity-kubernetes-auth/identity-kubernetes-auth-service.ts:181:19)\n    at async Object.login (/backend/src/services/identity-kubernetes-auth/identity-kubernetes-auth-service.ts:317:11)\n    at async Object.handler (/backend/src/server/routes/v1/identity-kubernetes-auth-router.ts:60:9)\ncaused by: Error: self-signed certificate in certificate chain\n    at TLSSocket.onConnectSecure (node:_tls_wrap:1677:34)\n    at TLSSocket.emit (node:events:524:28)\n    at TLSSocket.emit (node:domain:489:12)\n    at TLSSocket._finishInit (node:_tls_wrap:1076:8)\n    at ssl.onhandshakedone (node:_tls_wrap:862:12)\n    at TLSWrap.callbackTrampoline (node:internal/async_hooks:130:17)",
    "config": "[Redacted]",
    "code": "SELF_SIGNED_CERT_IN_CHAIN"
  },
  "msg": "self-signed certificate in certificate chain"
}
p
Hi @kjohnson Sharing the doc to support custom certificates in Infisical. https://infisical.com/docs/self-hosting/guides/custom-certificates
👍 1