{"record":{"id":"d018d08fc2e38065","repo":"kubernetes/kops","slug":"creation-of-aws-classic-load-balancers-is-no-longe","errorCode":null,"errorMessage":"creation of AWS Classic Load Balancers is no longer supported","messagePattern":"creation of AWS Classic Load Balancers is no longer supported","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"upup/pkg/fi/cloudup/awstasks/classic_load_balancer.go","lineNumber":151,"sourceCode":"\nfunc (e *ClassicLoadBalancer) Run(c *fi.CloudupContext) error {\n\treturn fi.CloudupDefaultDeltaRunMethod(e, c)\n}\n\nfunc (_ *ClassicLoadBalancer) ShouldCreate(a, e, changes *ClassicLoadBalancer) (bool, error) {\n\tif fi.ValueOf(e.Shared) {\n\t\treturn false, nil\n\t}\n\treturn true, nil\n}\n\nfunc (s *ClassicLoadBalancer) CheckChanges(a, e, changes *ClassicLoadBalancer) error {\n\tif a == nil {\n\t\tif fi.ValueOf(e.Name) == \"\" {\n\t\t\treturn fi.RequiredField(\"Name\")\n\t\t}\n\t\tif !fi.ValueOf(e.Shared) {\n\t\t\treturn fmt.Errorf(\"creation of AWS Classic Load Balancers is no longer supported\")\n\t\t}\n\t}\n\n\treturn nil\n}\n\nfunc (_ *ClassicLoadBalancer) RenderAWS(t *awsup.AWSAPITarget, a, e, changes *ClassicLoadBalancer) error {\n\tif fi.ValueOf(e.Shared) {\n\t\treturn nil\n\t}\n\n\treturn fmt.Errorf(\"creation of AWS Classic Load Balancers is no longer supported\")\n}\n\n// OrderLoadBalancersByName implements sort.Interface for []OrderLoadBalancersByName, based on name\ntype OrderLoadBalancersByName []*ClassicLoadBalancer\n\nfunc (a OrderLoadBalancersByName) Len() int      { return len(a) }","sourceCodeStart":133,"sourceCodeEnd":169,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/upup/pkg/fi/cloudup/awstasks/classic_load_balancer.go#L133-L169","documentation":"kOps no longer supports creating new AWS Classic Load Balancers. CheckChanges validates at plan time: if a ClassicLoadBalancer task is being created (a == nil) and is not marked Shared, creation is rejected before any API call.","triggerScenarios":"A cluster spec still references a classic (ELB) load balancer for a new resource — e.g. an old cluster spec using type like 'classic' API load balancer — while the task lacks shared: true.","commonSituations":"Old cluster manifests from kOps versions that supported ELB creation being applied with a modern kOps; hand-written specs using classicloadbalancer tasks without shared flag.","solutions":["Migrate the cluster to a Network Load Balancer (or Application Load Balancer) per current kOps defaults","If the ELB already exists and is externally managed, mark the task shared: true so kOps only adopts it","Upgrade the cluster spec to the current load-balancer configuration","Do not attempt to downgrade kOps; classic ELB creation is intentionally removed"],"exampleFix":"// before (attempting new creation)\nclassicLoadBalancer: {}\n// after\nclassicLoadBalancer:\n  shared: true  # only for adopting a pre-existing ELB; otherwise use NLB","handlingStrategy":"validation","validationCode":"# fail fast before apply if spec defines non-shared classic ELB\nif grep -A2 'classicLoadBalancer' cluster.yaml | grep -qv 'shared: true'; then\n  echo 'ERROR: classic ELB creation unsupported; use NLB or set shared: true'; exit 1\nfi","typeGuard":"function isShared(e) { return e.shared === true; }","tryCatchPattern":"try {\n  task.CheckChanges(a, e, changes);\n} catch (err) {\n  if (String(err).includes('Classic Load Balancers is no longer supported')) {\n    // migrate to NLB or set shared\n  }\n  throw err;\n}","preventionTips":["Migrate legacy manifests to NLB/ALB load balancers","Set shared: true when adopting pre-existing ELBs","Validate manifests with current kOps versions before apply"],"tags":["aws","elb","deprecated","validation"],"backgroundTag":"unsupported-classic-load-balancer-creation","analyzedSha":"4c8573c808a73d578c5eadc86d410646ea0b0d73","analyzedAt":"2026-09-05T04:13:19.212Z","contentChangedAt":"2026-09-05T04:13:19.212Z","schemaVersion":2},"datasetVersion":"2026-09-12T12:17:11.808Z"}