the aws-ebs-csi-driver has some undocumented requirements for AWS metadata that Im trying to sort out. The error you see is while running “node” mode for the csi driver.
docker run -i amazon/aws-ebs-csi-driver:latest node
I0405 15:23:53.620114 1 driver.go:71] Driver: ebs.csi.aws.com Version: v0.10.0
panic: EC2 instance metadata is not available
goroutine 1 [running]:
github.com/kubernetes-sigs/aws-ebs-csi-driver/pkg/driver.newNodeService(0xc00054a440, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
/go/src/github.com/kubernetes-sigs/aws-ebs-csi-driver/pkg/driver/node.go:87 +0x1d6
github.com/kubernetes-sigs/aws-ebs-csi-driver/pkg/driver.NewDriver(0xc000517f48, 0x6, 0x6, 0xc000526060, 0xc00051e180, 0xc000517f18)
/go/src/github.com/kubernetes-sigs/aws-ebs-csi-driver/pkg/driver/driver.go:93 +0x445
main.main()
/go/src/github.com/kubernetes-sigs/aws-ebs-csi-driver/cmd/main.go:31 +0x1bd
when running in controller mode you get the same error, HOWEVER, passing -e AWS_REGION=us-east-1 resolves the error when running in controller mode.
docker run -i -e AWS_REGION=us-east-1 amazon/aws-ebs-csi-driver:latest controller
^^ this seems to work
For some reason, this fix of passing the region does NOT resolve the error for node mode.
Has anyone encountered this before? Thanks!