Skip to main content

Karpenter troubleshooting

Check the status and events of the Karpenter controller, KCNodeClass, NodePool, and NodeClaim to diagnose why nodes are not being created or deleted.

Basic diagnostics​

Use the following commands to check key resources and Warning events.

Check basic Karpenter status
kubectl -n karpenter-kakaocloud get deployment,pod
kubectl get kcnodeclass,nodepool,nodeclaim
kubectl get events -A --field-selector type=Warning \
--sort-by=.lastTimestamp

Check controller logs and details of the affected resources.

Check logs and resource details
kubectl -n karpenter-kakaocloud logs \
deployment/karpenter-provider-kakaocloud --tail=200

kubectl describe kcnodeclass <KCNODECLASS_NAME>
kubectl describe nodepool <NODEPOOL_NAME>
kubectl describe nodeclaim <NODECLAIM_NAME>

Some Kubernetes version skew events are recorded as Normal and may not appear in Warning event results. Check the relevant KCNodeClass conditions.

Checks by symptom​

Controller does not run​

  • Pod is Pending or ContainerCreating: Check Pod events and image registry access. The credential Secret must contain applicationCredentialId, applicationCredentialSecret, and region; the signing key Secret must contain keyring.json.
  • Pod is CrashLoopBackOff: Check logs, the installation values for region, clusterName, and projectID, and IAM permissions. The region must be kr-central-2 and the signing key must be 32 bytes.
  • RESTARTS increases without a clear error: Verify that required CRDs are installed. If any are missing, reapply CRDs from the installed chart version.

Nodes are not created or do not become ready​

  • KCNodeClass has Ready=False: Check reasons and messages in status.conditions. Check subnets, worker security groups, worker images, key pairs, and IAM permissions for viewing resources.
  • KubernetesVersionReady=False: Check whether the reason is UnsupportedKubernetesVersion or KubernetesVersionSkew. Specify a minor version offered by Kubernetes Engine that is equal to or one version below the control plane.
  • KubernetesVersionDeprecated=True: WorkerVersionNotOffered means the current worker version is no longer offered for new configurations. Node provisioning continues for existing configurations. Plan an update as described in Manage deprecated Kubernetes versions.
  • ImagesReady=True with reason ImagesRetained: Images for the current version could not be retrieved, so previous images are retained. Change to a supported version or specify a validated image ID in spec.imageID.
  • Pods are Pending but no NodeClaim exists: Check NodePool and KCNodeClass Ready conditions, requirements, limits, and Pod events. Relax conflicting instance or availability zone requirements and adjust resource limits.
  • A NodeClaim exists but the node does not become Ready: Check NodeClaim events, API server/DNS/metadata service connectivity, NAT and egress, worker security groups, and CNI rules. The metadata service address is 169.254.169.254.
  • Pods on Cilium nodes remain Pending: Check the Cilium DaemonSet status and the node.cilium.io/agent-not-ready startup taint. Do not use this taint in Calico clusters.
  • GPU node is Ready but GPU resources are 0: Check GPU Operator, the device plugin, and nvidia.com/gpu capacity and allocatable values. For details, see Check GPU runtime.
  • Unexpected node replacement occurs: Check NodeClaim events for consolidation, drift, or expiration reasons. Review consolidateAfter, disruption budgets, expireAfter, and KCNodeClass change history.

If KCNodeClass has Ready=False, check the reason and message for each condition.

Check KCNodeClass conditions
kubectl get kcnodeclass <KCNODECLASS_NAME> \
-o jsonpath='{range .status.conditions[*]}{.type}{"\t"}{.status}{"\t"}{.reason}{"\t"}{.message}{"\n"}{end}'

The main conditions are as follows.

ConditionWhat to check
KubernetesVersionReadyCluster state and bootstrap.kubernetesVersion
KubernetesVersionDeprecatedWhether the worker Kubernetes version in use is still offered
ImagesReadyWorker images for the Kubernetes version
SubnetsReadySubnet IDs, project, and supported availability zones
SecurityGroupsReadySecurity group IDs and inclusion of the Kubernetes Engine worker security group
KeyPairReadyKey pair specified in keyName
ReadyOverall result of the conditions above

Issues during updates or deletion​

  • Control plane update API returns HTTP 400: If the code is InvalidRequest.BadRequest and the message starts with upgrade the karpenter nodes of cluster, replace all Karpenter nodes with the current control plane version before retrying.
  • Control plane update API returns HTTP 500: If the code is InternalError.InternalServerError, do not infer a version mismatch from the response alone. Retry after a short wait and contact Helpdesk if it recurs.
  • Kubernetes Engine node deletion API returns HTTP 404: Check whether the code is ResourceNotAssociated.NotFound. Reclaim Karpenter nodes by deleting NodeClaims rather than using the Kubernetes Engine node deletion API.
  • Node or NodeClaim is not deleted: Check PodDisruptionBudgets, karpenter.sh/do-not-disrupt, terminating Pods, and NodeClaim events. Adjust reclamation policies when workloads can be safely interrupted, and keep the controller running.
  • Node is gone but the instance remains: Check instances and volumes in the console and signature verification logs. Try to restore the controller with the original signing key. If that is not possible, see Identify orphaned resources.
  • Cluster remains Deleting: Compare instances and volumes recorded before deletion with the console. If the state persists after identifying orphaned resources, contact Helpdesk.

Check GPU runtime​

Verify that GPU nodes have the nvidia.com/gpu resource registered.

Check GPU capacity and allocatable
kubectl get nodes -l karpenter.sh/nodepool=karpenter-gpu \
-o custom-columns='NODE:.metadata.name,CAPACITY:.status.capacity.nvidia\.com/gpu,ALLOCATABLE:.status.allocatable.nvidia\.com/gpu'

If all GPU Operator Pods are Running but the values are empty, check the effective containerd configuration. The following command may be restricted by Pod Security policies.

Check containerd NVIDIA runtime
kubectl debug node/<GPU_NODE_NAME> -it --image=busybox:1.36 -- \
chroot /host sh -c \
"containerd config dump | grep -E 'runtimes.nvidia'"

If runtimes.nvidia is absent, check whether NVIDIA Container Toolkit has been applied. Have GPU Operator reapply the runtime configuration rather than editing /etc/containerd/config.toml directly.

Resolve deletion delays and remaining resources​

If NodeClaim deletion is delayed, check Pods on the connected node and disruption policies.

Check node Pods and disruption policies
kubectl get pods -A --field-selector spec.nodeName=<NODE_NAME>
kubectl get pdb -A
kubectl describe nodeclaim <NODECLAIM_NAME>

Forcibly removing finalizers may prevent Karpenter from cleaning up instances and volumes. Do not remove finalizers as a routine recovery procedure. Restore the controller with the original signing key and settings, and retry deletion.

Changing a node or Virtual Machine name or description may exclude it from automatic reclamation. In that case, instances and charges may remain even after NodeClaim deletion.

Identify orphaned resources​

If instances or volumes remain after cluster deletion completes, compare the following information.

  • NodeClaim provider IDs and instance/volume IDs recorded before deletion
  • Instance name karpenter-<first 8 characters of cluster UID>-<NodeClaim name>
  • Instance description starting with v=1;m=karpenter;

The cluster UID is included in the API server endpoint in kubeconfig and differs from the cluster ID shown in the console.

If you have verified that an instance was created for the deleted cluster and there are no other Karpenter clusters in the same project, you can delete the remaining instance in Virtual Machine > Instances.

For volumes, compare IDs recorded before deletion and creation timestamps. Delete a volume only if it has no Connected instance. If you cannot distinguish it from another cluster's resources, do not delete it directly; contact Helpdesk > Technical inquiry.

Clean up CRDs and signing keys​

The signing key is required to verify ownership of remaining instances. Do not delete the signing key Secret or backups before verifying that all instances have been deleted.

If you do not plan to reinstall Karpenter and no other configuration uses the same CRDs, you can delete the CRDs after uninstalling the Helm release.

Delete Karpenter CRDs
kubectl delete crd \
kcnodeclasses.karpenter.kakaocloud.com \
nodeclaims.karpenter.sh \
nodepools.karpenter.sh \
nodeoverlays.karpenter.sh \
capacitybuffers.autoscaling.x-k8s.io

After verifying that no instances remain, remove the stored keyring.json backup.

If you cannot restore the controller or verify instance reclamation, contact Helpdesk > Technical inquiry and provide the following information.

  • Cluster name and ID
  • Karpenter Provider chart version and controller image
  • KCNodeClass, NodePool, and NodeClaim YAML
  • Warning events and controller logs
  • Related node names and Virtual Machine instance IDs
  • Time of the issue and changes performed