Configuring kubectl access and Kubernetes secrets

Configure kubectl access to your Kubernetes cluster and create the required authentication, bootstrap, and container registry secrets to prepare your environment for the Anywhere Cloud Console deployment.

Before deploying the Anywhere Cloud Console, you must establish kubectl access to your cluster and create secrets within a dedicated namespace. These secrets enable authentication with Cloudera Cloud Factory, pull container images from the registry, and provide administrator credentials for the Anywhere Cloud Console.

  • You have kubectl installed on your local machine.
  • You have recorded the project ID, the robot user's API access and secret keys, and the Cloudera Cloud Factory domain name.
  1. Go to your project in the Cloudera Cloud Factory management console.
  2. Go to Kubeconfigs and click Add KubeConfig.
  3. Specify the following fields in the Add KubeConfig menu:
    • Name — Enter a unique name for the configuration.
    • Namespace (optional) — Leave this field empty. Selecting a namespace hides the cluster-admin and admin roles.
    • Role — Select cluster-admin. The available roles are cluster-admin, admin, edit, and view. The cluster-admin and admin roles are hidden when you select a namespace.
    • TTL (Valid Through) — Defaults to Never expires. The available values are 1 hour, 3 hours, 1 day, 1 month, 3 months, 1 year, 10 years, and a custom value with a minimum of 10 minutes. Cloudera recommends setting a finite value, such as 1 day, for the installation.
    • Kubeconfig Visibility — Select the users who can access or modify the configuration.
  4. Click Add.
  5. Click the More Options (three dots) icon and select the download option to save the kubeconfig file to your local machine.
  6. Export the kubeconfig file by running the following command:
    export KUBECONFIG=/path/downloaded-kubeconfig
  7. Create a dedicated namespace to isolate the application resources by running the following command:
    kubectl create namespace awc-core
  8. Create the authentication secret in your namespace by running the following command.
    Replace the placeholder values with the specific configuration details for your environment.
    kubectl create secret -n awc-core generic awc-taikun-secrets \
    --from-literal=MARKETPLACE_REGISTRIES="container.repository.cloudera.com/cloudera/awc/marketplace" \
    --from-literal=MARKETPLACE_SYNC_INTERVAL="60" --from-literal=TAIKUN_API_HOST="<***YOUR API HOST***>" \
    --from-literal=TAIKUN_PROJECT_ID="<***YOUR PROJECT ID***>" \
    --from-literal=TAIKUN_ACCESS_KEY="<***YOUR ACCESS KEY***>" \
    --from-literal=TAIKUN_SECRET_KEY="<***YOUR SECRET KEY***>" \
    --from-literal=TAIKUN_ACCOUNT_NAME="<***YOUR CLOUDERA CLOUD FACTORY DOMAIN***>"
    You can obtain the required information through the Cloudera Cloud Factory:
    • TAIKUN_PROJECT_ID: The ID of your project that can be found in Project Properties on the page of your project.
    • TAIKUN_ACCESS_KEY and TAIKUN_SECRET_KEY: The access and secret keys are created by the robot user in Generating Cloudera Cloud Factory API credentials API credentials.
    • TAIKUN_ACCOUNT_NAME: The domain name configured for Cloudera Cloud Factory. The domain name can be found under the Domain Management section on the left navigation pane.
  9. Create the administrator bootstrap credentials by running the following command:
    kubectl create secret -n awc-core generic ldap-bootstrap-credentials \
      --from-literal=username=admin \
      --from-literal=password=<***your-admin-password***>