kubernetes/kops · error
InstanceGroups::Update not supported for server-side client
Error message
InstanceGroups::Update not supported for server-side client
What it means
The kops server-side API client for InstanceGroups deliberately implements only read (List/Get) and Create... actually only List/Get-style operations; Update is intentionally unimplemented, so any attempt to update an InstanceGroup through this client fails immediately with this sentinel error rather than silently performing a partial update. It fires when code holding a server-side clientset calls InstanceGroupsFor(cluster).Update; callers must use the VFS-based client or a real Kubernetes client for updates.
Source
Thrown at cmd/kops-controller/pkg/controllerclientset/instancegroups.go:104
func (c *instanceGroups) List(ctx context.Context, options metav1.ListOptions) (*kopsapi.InstanceGroupList, error) {
list := &kopsapi.InstanceGroupList{}
items, err := c.base.List(ctx, list.Items, options)
if err != nil {
return nil, err
}
list.Items = items.([]kopsapi.InstanceGroup)
for i := range list.Items {
c.addLabels(&list.Items[i])
}
return list, nil
}
func (c *instanceGroups) Create(ctx context.Context, g *kopsapi.InstanceGroup, opts metav1.CreateOptions) (*kopsapi.InstanceGroup, error) {
return nil, fmt.Errorf("InstanceGroups::Create not supported for server-side client")
}
func (c *instanceGroups) Update(ctx context.Context, g *kopsapi.InstanceGroup, opts metav1.UpdateOptions) (*kopsapi.InstanceGroup, error) {
return nil, fmt.Errorf("InstanceGroups::Update not supported for server-side client")
}
func (c *instanceGroups) Delete(ctx context.Context, name string, options metav1.DeleteOptions) error {
return fmt.Errorf("InstanceGroups::Delete not supported for server-side client")
}
func (r *instanceGroups) DeleteCollection(ctx context.Context, options metav1.DeleteOptions, listOptions metav1.ListOptions) error {
return fmt.Errorf("InstanceGroups::DeleteCollection not supported for server-side client")
}
func (r *instanceGroups) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) {
return nil, fmt.Errorf("InstanceGroups::Watch not supported for server-side client")
}
func (r *instanceGroups) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *kopsapi.InstanceGroup, err error) {
return nil, fmt.Errorf("InstanceGroups::Patch not supported for server-side client")
}
View on GitHub (pinned to 4c8573c808)
Solutions
- Apply instance group changes via the kops CLI (kops replace -f ig.yaml; kops update cluster --yes; kops rolling-update cluster)
- Use a VFS-backed clientset outside the controller if programmatic updates are needed
- Emit a reconciliation event/annotation and let an external tool perform the update
Example fix
// before
_, err := igs.Update(ctx, modifiedIG, metav1.UpdateOptions{})
// after
// $ kops replace -f modified-ig.yaml && kops update cluster --yes
ig, err := igs.Get(ctx, modifiedIG.Name, metav1.GetOptions{}) Defensive patterns
Strategy: try-catch
Validate before calling
if isReadOnlyInstanceGroupClient(igs) {
return errors.New("instance group updates must be applied via kops replace/update cluster")
} Try / catch
_, err := igs.Update(ctx, g, metav1.UpdateOptions{})
if err != nil && strings.Contains(err.Error(), "Update not supported") {
// marshal g to YAML, then: kops replace -f - && kops update cluster --yes
return replaceInstanceGroupViaCLI(ctx, g)
} Prevention
- Apply desired instance group state via YAML + kops replace
- Do not implement in-controller reconciliation writes to instance groups
- Remember Get/List are the only supported operations server-side
When it happens
Trigger: Calling instanceGroups.Update(ctx, ig, metav1.UpdateOptions{}) after modifying an InstanceGroup object fetched via Get/List, e.g. relabeling or resizing from controller code.
Common situations: Porting `kops edit ig`-style mutation or drain/rolling-update automation into the controller; applying desired-state reconciliation to instance groups.
Related errors
- InstanceGroups::Create not supported for server-side client
- method CreateCluster not supported in server-side client
- method UpdateCluster not supported in server-side client
- method ListClusters not supported in server-side client
- method ConfigBaseFor not supported in server-side client
AI-assisted analysis of kubernetes/kops@4c8573c808 (2026-09-05).
Data as JSON: /api/errors/d5a46d18d1152280.
Report an issue: GitHub.