GoogleContainerTools/skaffold · warning
kind %s is not supported
Error message
kind %s is not supported
What it means
ownerMetaObject resolves a Kubernetes resource's owner reference to its owning object by looking it up with the appropriate typed client. Only a fixed set of kinds (Deployment, ReplicaSet, Job, CronJob, StatefulSet, ReplicationController, Pod) is supported; any other owner Kind hits the default branch and returns this error. The caller (TopLevelOwnerKey) logs a warning and returns an empty owner key.
Source
Thrown at pkg/skaffold/kubernetes/owner.go:69
}
switch owner.Kind {
case "Deployment":
return client.AppsV1().Deployments(ns).Get(ctx, owner.Name, metav1.GetOptions{})
case "ReplicaSet":
return client.AppsV1().ReplicaSets(ns).Get(ctx, owner.Name, metav1.GetOptions{})
case "Job":
return client.BatchV1().Jobs(ns).Get(ctx, owner.Name, metav1.GetOptions{})
case "CronJob":
return client.BatchV1beta1().CronJobs(ns).Get(ctx, owner.Name, metav1.GetOptions{})
case "StatefulSet":
return client.AppsV1().StatefulSets(ns).Get(ctx, owner.Name, metav1.GetOptions{})
case "ReplicationController":
return client.CoreV1().ReplicationControllers(ns).Get(ctx, owner.Name, metav1.GetOptions{})
case "Pod":
return client.CoreV1().Pods(ns).Get(ctx, owner.Name, metav1.GetOptions{})
default:
return nil, fmt.Errorf("kind %s is not supported", owner.Kind)
}
}
View on GitHub (pinned to a1189de023)
Solutions
- Identify the unsupported kind from the error message and add a case for it in ownerMetaObject's switch with the appropriate typed client lookup
- As a workaround, note the top-level owner key will be empty (TopLevelOwnerKey returns "") and the feature degrades gracefully
- If a CRD controller creates the pods, trace ownership manually with kubectl get <kind> <name> -o jsonpath='{.metadata.ownerReferences}'
Example fix
// before
case "Pod":
return client.CoreV1().Pods(ns).Get(ctx, owner.Name, metav1.GetOptions{})
default:
return nil, fmt.Errorf("kind %s is not supported", owner.Kind)
// after
case "Pod":
return client.CoreV1().Pods(ns).Get(ctx, owner.Name, metav1.GetOptions{})
case "DaemonSet":
return client.AppsV1().DaemonSets(ns).Get(ctx, owner.Name, metav1.GetOptions{})
default:
return nil, fmt.Errorf("kind %s is not supported", owner.Kind) Defensive patterns
Strategy: try-catch
Validate before calling
// check the owner kind before relying on TopLevelOwnerKey
supported := map[string]bool{"Deployment": true, "ReplicaSet": true, "Job": true, "CronJob": true, "StatefulSet": true, "ReplicationController": true, "Pod": true}
var ownersKnown = true
for _, or := range obj.GetOwnerReferences() {
if !supported[or.Kind] { ownersKnown = false }
} Try / catch
key := TopLevelOwnerKey(ctx, obj, kubeContext, kind)
if key == "" {
// owner resolution failed (possibly unsupported kind); fall back to resource's own Kind-Name
key = fmt.Sprintf("%s-%s", kind, obj.GetName())
} Prevention
- Prefer port-forwarding Deployments/Jobs/StatefulSets rather than custom CRD-owned workloads
- Handle the empty TopLevelOwnerKey return value in dependent code
- Keep the kind switch in owner.go updated when new workload kinds are introduced
When it happens
Trigger: Walking owner references of a resource whose OwnerReference.Kind is outside the supported list — e.g. DaemonSet, CustomResource (CRD), Service, ConfigMap-owned objects, or controller-generated kinds from operators — during TopLevelOwnerKey.
Common situations: Port-forwarding or debugging pods owned by a DaemonSet; resources owned by a custom operator/CRD; newer workload kinds (e.g. custom workload controllers) not in the hardcoded switch.
Related errors
- c.Message (pod status condition message)
- unable to lookup minikube executable. Please add it to PATH
- invalid local-registry-hosting ConfigMap
- strings.Join(errMsgs, "\n") (joined helm cleanup error messa
- rs.ae.Message (actionable error message from status check)
AI-assisted analysis of GoogleContainerTools/skaffold@a1189de023 (2026-09-05).
Data as JSON: /api/errors/842b740f3cf02b90.
Report an issue: GitHub.