Follow the guidelines for obtaining kubeconfig
on AWS.
You need the user's Amazon Resource Name (ARN) to obtain the kubeconfig
file. You can get the ARN from the user or look up a user's ARN in your AWS account. To
obtain a user's ARN from the AWS account, complete the following steps:
-
Obtain the Amazon Resource Name (ARN) .
-
Using AWS UI, go to your organization's AWS and look up the user. The ARN is available on the
Summary page.
-
Using AWS CLI, run the following command to get the ARN:
$ aws sts get-caller-identity
Consider the following example:
# Sample output
{
"UserId": "ABCDE12345FGHIJKLMNO6789",
"Account": "888888888888",
"Arn": "arn:aws:iam::888888888888:user/joesmith"
}
-
Obtain your Cloudera AI Inference service CRN, run the following command:
$ cdp ml list-ml-serving-apps
-
Grant access to the Cloudera AI Inference service AWS cluster, run the following
command:
$ cdp ml grant-ml-serving-app-access \
--resource-crn [***APPLICATION-CRN***] \
--identifier [***AWS_ARN***]
-
Obtain the
kubeconfig
used to access the above cluster by
running:
$ cdp ml get-ml-serving-app-kubeconfig \
--app-crn [***APPLICATION-CRN***] \
| jq '.kubeconfig' | yq > myconfig.yaml
-
Send the downloaded Kubernetes configuration file to the user who has been granted
access. To connect to the Amazon EKS cluster, you must have
aws-iam-authenticator
installed.
- Optional:
Get the logs of the Cloudera AI Inference service API server:
$ KUBECONFIG=myconfig.yaml kubectl get logs deployment/api -n cml-serving