Configuring kubectl access to the cluster

Create a cluster-admin kubeconfig file for the project, download it, and use it to connect kubectl to the cluster, which the Cloudera Anywhere Cloud installation requires.

A kubeconfig file provides kubectl with the API server address and the credentials for the cluster. Cloudera Cloud Factory generates a ready-to-use, already authenticated kubeconfig file for your project.

  1. Go to your project in the Cloudera Cloud Factory management console.
  2. Go to Kubeconfigs and click the Add KubeConfig button.
  3. In the Add KubeConfig dialog box, specify the following fields:
    Name
    Enter a unique name for the configuration. Use at least three lowercase alphanumeric characters.
    Namespace (optional)
    Leave this field empty. If you select a namespace, the cluster-admin and admin roles are hidden.
    Role
    Select the cluster-admin role for the configuration. The roles that the list offers are cluster-admin, admin, edit, and view.
    Valid Through
    Set the expiration period for the configuration. The default value is Never expires. You can also select 1 hour, 3 hours, 1 day, 1 month, 3 months, 1 year, 10 years, or Custom. The minimum custom value is 10 minutes. Cloudera recommends that you set a finite value for the installation, for example, 1 day.
    Kubeconfig Visibility

    Select the users who can access or modify the configuration:

    • Specific User: creates a personal kubeconfig that only the selected user can use.
    • Users with access to the Project or Managers: creates an application kubeconfig that all users with access to the project, or only the project managers, can use.
  4. Click the Add button.
  5. Click the More Options (three dots) icon next to the new configuration, and then select Download to save the kubeconfig file to your local machine.
  6. Set the KUBECONFIG environment variable by running the following command:
    export KUBECONFIG=[***KUBECONFIG FILE PATH***]
  7. Verify that DNS and the certificate and trust profile are active on the cluster by running the following commands:
    kubectl get namespaces
    kubectl get deployments --namespace ccf-external-dns
    kubectl get deployments --namespace ccf-cert-manager
    • The ccf-external-dns namespace contains the external-dns-primary deployment.
    • The ccf-cert-manager namespace contains the cert-manager deployment. It contains the trust-manager deployment only if the profile is trust-only or has CA bundles.

Your local kubectl client is configured to access the cluster with cluster-admin rights, and the DNS and certificate components are running.

Install Cloudera Anywhere Cloud as described in the Cloudera Anywhere Cloud installation documentation.