Table of Contents

Search

  1. Preface
  2. Advanced clusters
  3. Setting up AWS
  4. Setting up Google Cloud
  5. Setting up Microsoft Azure
  6. Setting up a self-service cluster
  7. Setting up a local cluster
  8. Advanced configurations
  9. Troubleshooting
  10. Appendix A: Command reference

Advanced Clusters

Advanced Clusters

Configure cluster authentication

Configure cluster authentication

When you create a self-service cluster on AWS, you can use the AWS CLI to allow the Secure Agent to authenticate to the cluster. Before you configure cluster authentication, ensure that the AWS CLI is installed on the Secure Agent machine.
Specify the AWS credentials in the kubeconfig file using the AWS CLI. Use the AWS CLI to define the appropriate profile to use. The environment variables that you set in the
exec
flow take precedence over the environment variables that are configured in your environment.
The following sample command demonstrates how to set up kubectl to use authentication tokens provided by AWS CLI authentication:
users: - name: arn:aws:eks:ap-southeast-1:543463116864:cluster/cdie-eks-GT3YbtNg user: exec: apiVersion: client.authentication.k8s.io/v1alpha1 args: - --region - ap-southeast-1 - eks - get-token - --cluster-name - cdie-eks-GT3YbtNg command: aws
You can also authenticate a self-service cluster on AWS using Kubernetes client certificates and service account tokens. For more information about Kubernetes authentication strategies, see the Kubernetes documentation.
In a cluster that uses AWS CLI authentication, a mapping might fail if it runs longer than the duration of the credentials. To avoid this, switch the authentication mechanism to service account token authenticator and run the mapping again.

0 COMMENTS

We’d like to hear from you!