I have a kubernetes typescript file and a .pem file under same parent directory in vscode, but i got error error: ENOENT: no such file or directory, open './cert.pem'
, it seems like my ts file can not detect pem file exists
const dataServiceTlsSecret = addResource(
new Secret({
metadata: {
name: DATA_SERVICE,
},
type: "kubernetes.io/tls",
stringData: {
"tls.crt": fs.readFileSync("./cert.pem", 'utf-8'),
"tls.key": fs.readFileSync("./key.pem", 'utf-8'),
}
})
)
I also tried to import .pem file on the top of my ts file, it doesn't show any .pem file from suggestion popout. any suggestions on how I can read pem file content from my ts file?