Skip to main content

Kubernetes Configuration

After installing Kubernetes tools, configure access to your organization's clusters. The p6m CLI automates SSO configuration for both AWS (EKS) and Azure (AKS) clusters.

Prerequisites

SSO Configuration

The p6m CLI automatically configures cloud credentials and Kubernetes cluster access:

# Configure both AWS and Azure (recommended)
p6m sso

# Configure AWS only (updates ~/.aws/config and ~/.kube/config for EKS)
p6m sso aws

# Configure Azure only (updates ~/.kube/config for AKS)
p6m sso azure

This command will:

  1. Configure AWS SSO profiles in ~/.aws/config
  2. Configure Azure credentials
  3. Update ~/.kube/config with entries for all accessible clusters

Verify Configuration

After running SSO configuration:

# List available contexts
kubectx

# Or using kubectl directly
kubectl config get-contexts

# Test connection to a cluster
kubectx <cluster-name>
kubectl get nodes

Manual Cluster Access

If you need to add a cluster manually:

# Login to AWS SSO
aws sso login --profile <profile-name>

# Add EKS cluster to kubeconfig
aws eks update-kubeconfig --name <cluster-name> --region <region> --profile <profile-name>