kubectl on Kestrel
Your kestrel context (from Install kubelogin) points at https://proxy.kestrel.arbutus.cloud. That endpoint is capsule-proxy: it forwards requests to the API server and filters cluster-scoped lists, such as kubectl get namespaces, down to your tenant.
Deploy through Git and ArgoCD (Your repo, your workloads). Use kubectl to inspect, debug and run short experiments.
What you can and can’t do
Section titled “What you can and can’t do”Every member of your tenant has the admin role in every tenant namespace (Tenancy), so get, describe, logs, exec, port-forward, apply, delete and the rest work there. kubectl top works too, because metrics-server is installed. Use kubectl auth can-i --list -n <tenant>-prod to see the full set. ArgoCD syncs with the same roles (ArgoCD on Kestrel).
| You can’t | Instead |
|---|---|
Node operations (cordon, drain, taint) | Open a ticket. |
Create, edit or patch Applications in argo-cd | Use the ArgoCD UI, or keep the Application in one of your namespaces (Your repo, your workloads). |
| Create ServiceMonitors or PodMonitors | Ask RCS (Monitoring). |
| List or delete PersistentVolumes | Open a ticket (Persistent volumes). |
Create LimitRange, ResourceQuota or ResourcePoolClaim objects | Request quota changes (Quotas). |
Create namespaces not named <tenant>-<name> | kubectl create namespace <tenant>-<name> |
Admission also rejects LoadBalancer, NodePort and ExternalName Services, priority classes other than uber-user-*, wildcard Ingress hosts, and Pods that violate PodSecurity restricted. These apply equally to kubectl and ArgoCD; see Known limitations.
When a Deployment’s Pods are denied, whether by PodSecurity or the namespace’s LimitRange, no Pods appear and the error is only in the ReplicaSet’s events:
kubectl describe replicaset -n <tenant>-prod -l app=my-appkubectl debug
Section titled “kubectl debug”Tenants can’t add ephemeral containers, so kubectl debug on a running Pod fails with forbidden on pods/ephemeralcontainers. Debug a copy of the Pod instead. This starts a copy with the named container’s command replaced by a shell:
kubectl debug my-app-7d9f8-abcde -n <tenant>-prod -it \ --copy-to=my-app-debug --container=my-app --profile=restricted -- sh- The copy keeps the Pod’s
securityContext, so it passes PodSecurityrestricted. It has no labels, so Services don’t route to it. - The container’s image needs a shell. To swap in another image, add
--set-image=my-app=<image>; it must run as a non-root numeric UID unless the Pod setsrunAsUser. - Delete the copy when you finish:
kubectl delete pod my-app-debug -n <tenant>-prod.
kubectl changes and ArgoCD selfHeal
Section titled “kubectl changes and ArgoCD selfHeal”With selfHeal: true (the recommended default), ArgoCD watches the resources it manages and reverts live drift within seconds. The Git poll only governs how fast new commits deploy.
| On an ArgoCD-managed resource | Result |
|---|---|
apply, edit, patch, scale, set image | Reverted within seconds. Change Git instead. |
delete | Recreated from Git. To remove it, delete the manifest from Git (with prune: true). |
rollout restart | Not reverted. The Pods roll as usual. |
rollout undo | Reverted if the result differs from Git. Revert the commit instead. |
delete pod | The ReplicaSet replaces the Pod. ArgoCD sees no drift. |
Resources that no Application manages are left alone.
Pausing auto-sync
Section titled “Pausing auto-sync”To keep a kubectl change long enough to test it:
- Pause. In the ArgoCD UI, open the Application → App Details → Sync Policy → Disable Auto-Sync. For an Application in
argo-cd, this is UI-only:kubectl patchthere returnsForbidden. - Mutate. Your
kubectl apply,scale,set imageand similar changes now stick. The Application shows OutOfSync. - Capture or revert. To keep the change, commit it to Git first, then click Enable Auto-Sync; ArgoCD finds no drift. To discard it, click Enable Auto-Sync right away and ArgoCD restores the Git state.