How-To: Webex Kubed
This page ports the procedures from the old docs/tools/kubernetes/how-to.md guide. Commands use placeholders where values are environment-specific or sensitive.
Create an ECR Repository for a Docker Image
- Open the
wxcdi-observability/ecr.yamlfile in thewbx3-application-groupsrepository. - Add the image repository name and the correct artifact type using an existing WxCDI entry as the pattern.
- Open a pull request against the repository's current default branch.
- Add the
onboardinglabel. - Obtain the required application-group and platform review.
- Merge the approved change and confirm the onboarding pipeline created the repository.
- Verify it in the ECR synchronization portal before changing a Harness pipeline.
Repository: WebexPlatform/wbx3-application-groups
Create an ECR Repository for a Helm Chart
Use the same onboarding workflow as a Docker image, but declare the entry as the Helm-chart type expected by the application-group schema.
- Update
application-groups/wxcdi-observability/ecr.yaml. - Open a pull request and add the
onboardinglabel. - Complete review and merge.
- Confirm the onboarding pipeline succeeded.
- Search the ECR synchronization portal for the chart name.
- Publish a versioned chart through the managed chart pipeline.
Do not publish a chart manually before onboarding completes; the pipeline must own repository creation and permissions.
Log In to a Kubernetes Cluster
Prerequisites
- Membership in the approved WxCDI Kubed access group/persona.
- Membership in the
wbx3-allMyID group. - Access to the required Keeper namespace through the approved WxCDI admin group.
vault-token-helperinstalled.kubectl-wbx3installed.kubectlinstalled and no conflictingKUBECONFIGoverride.
The old guide recommends a specific historical kubectl-wbx3 version as a workaround for an mTLS issuer error. Do not pin to that version automatically; use the currently supported release from Webex Kubed and consult the platform owner if certificate issuance returns HTTP 403.
Keeper Authentication
- Open InfoSec Keeper.
- Select the approved namespace for the target environment.
- Authenticate with OIDC.
- Keep the token only in the active secured shell session.
export VAULT_ADDR=https://keeper.cisco.com
export VAULT_NAMESPACE=meetpaas/mccprod
vault login
Enter the token interactively when prompted. Do not include the token in the command line, shell history, screenshots, or documentation.
Kubed Login
Choose the cluster from Clusters & Access, then run:
export CLUSTER_NAME=<cluster-name>
export CLUSTER_DOMAIN=prod.infra.webex.com
export CNC_DOMAIN=prod.infra.webex.com
export CNC=mccprod
export VAULT_ADDR=https://keeper.cisco.com
export VAULT_NAMESPACE=meetpaas/mccprod
kubectl wbx3 login "${CLUSTER_NAME}" --role wxcdi-prod-admin
Verify the generated context before using it:
kubectl config current-context
kubectl auth can-i get pods --all-namespaces
The generated client certificate is temporary. Reauthenticate rather than copying the kubeconfig or certificate to another user or system.
View Available Helm Chart or Image Versions
- Open the ECR synchronization portal.
- Search for the exact image/chart name or
wxcdi-observability. - Open List of images for the intended repository.
- Record the tag and digest.
- Confirm the version was produced by the expected source commit and pipeline before selecting it in Helm values.
Generate an ECR Read/Write AppRole Credential
Privileged procedure
Generate AppRole Secret IDs only when authorized to manage the ECR pipeline identity. A Secret ID is a credential and must never be committed, pasted into chat/tickets, or retained in terminal output.
The wxcdi-ecr-readwrite persona is defined in the wbx3-application-groups repository.
- Authenticate to Keeper using the correct namespace and an identity allowed to manage the AppRole.
- Verify the AppRole path and policy in the persona source.
- Retrieve the current Role ID from Keeper. Do not copy a Role ID from documentation.
- Generate a new Secret ID through the approved Keeper workflow.
- Store the Secret ID directly in the managed Harness secret entry.
- Run a non-production authentication/build test.
- Revoke the superseded Secret ID after all consumers are verified.
The historical command shape is shown below without outputs:
export VAULT_NAMESPACE=<approved-namespace>
vault read auth/wxcdi-approle/role/wxcdi-ecr-readwrite/role-id
vault write -f auth/wxcdi-approle/role/wxcdi-ecr-readwrite/secret-id
Treat both command output and terminal scrollback as sensitive. Use the approved secure transfer mechanism to update Harness.
Manually Push an Image to ECR
Break-glass use only
Harness is the standard image publishing path. A manual push bypasses normal build evidence and should be used only under an approved change or incident procedure.
- Confirm the target ECR repository already exists.
- Build or obtain an image whose source commit, scan result, tag, and digest are known.
- Authenticate through the approved Keeper/AppRole helper and obtain short-lived AWS credentials in the current shell.
- Authenticate Docker without placing the password on the command line:
aws ecr get-login-password --region <aws-region> \
| docker login --username AWS --password-stdin <ecr-registry>
- Tag and push the exact immutable version:
docker tag <local-image>:<tag> <ecr-registry>/<repository>:<tag>
docker push <ecr-registry>/<repository>:<tag>
- Record the resulting digest and compare it with the local image digest.
- Log out and clear temporary credentials:
docker logout <ecr-registry>
unset AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY AWS_SESSION_TOKEN
unset VAULT_TOKEN
- Update Helm configuration through pull request; do not modify a production Deployment directly.