Kubernetes provider use microk8s created with cloud-init

I’ve used aws_instance and cloud-init to setup a microk8s but now not sure how to point https://registry.terraform.io/providers/hashicorp/kubernetes/ to microk8s on this ec2 instance?
How should I configure provider “kubernetes”? Set load_config_file = "false" and use host to point to the ec2 instance ip address?