terraform-oci-oke
terraform-oci-oke copied to clipboard
How can I generate user specific kubeconfig?
Hi, I am trying to generate kubeconfig for non-privileged user to access the cluster. I have followed the Example 3 in the documentation here and created User, Group, Policy and clusterrolebindings.
The last bit that I want to know is, how can I generate the kubeconfig for that new user? I am creating it in Terraform like this:
resource "oci_identity_user" "non_privileged_user" {
compartment_id = var.compartment_id
description = "non priviledged user for access OKE cluster"
name = "foo"
}
And with that, I can have the OCID of that user, and pass to a resource that generate kubeconfig.
But the trouble is, data.oci_containerengine_cluster_kube_config does not accept a userId or groupId at the moment. Is there any other expected way to generate the config for the user?