mirror of https://github.com/kubernetes/kops.git
Add instruction for no downtime
This commit is contained in:
parent
627ba720a9
commit
9bd0a7aedb
|
|
@ -74,6 +74,18 @@ has been updated by a newer version of kops unless it is given the `--allow-kops
|
||||||
|
|
||||||
* See note about [Openstack Cinder plugin](#openstack-cinder-plugin) above.
|
* See note about [Openstack Cinder plugin](#openstack-cinder-plugin) above.
|
||||||
|
|
||||||
|
* Terraform users, in order to prevent downtime you will have to remove the state of the existing ELB attatchments from your terraform state file. This is due to us migrating to setting the loadbalancer attatchment when defining the ASG resource. The migration was required due to a bug described in #9913.
|
||||||
|
|
||||||
|
To prevent downtime, follow these steps with the new version of Kops:
|
||||||
|
```
|
||||||
|
kops update cluster --target terraform ...
|
||||||
|
terraform plan
|
||||||
|
terraform state list | grep aws_autoscaling_attachment | xargs -L1 terraform state rm
|
||||||
|
terraform plan
|
||||||
|
# Ensure these resources are no longer being destroyed and recreated
|
||||||
|
terraform apply
|
||||||
|
```
|
||||||
|
|
||||||
* If you are using Terraform with an additional .tf file and using "aws_autoscaling_attachment" to attach additional Load Balancers or ALB/NLB Target Groups you'll need to migrate to [attaching them through the InstanceGroup spec instead](https://kops.sigs.k8s.io/instance_groups/#externalloadbalancers).
|
* If you are using Terraform with an additional .tf file and using "aws_autoscaling_attachment" to attach additional Load Balancers or ALB/NLB Target Groups you'll need to migrate to [attaching them through the InstanceGroup spec instead](https://kops.sigs.k8s.io/instance_groups/#externalloadbalancers).
|
||||||
|
|
||||||
# Deprecations
|
# Deprecations
|
||||||
|
|
|
||||||
|
|
@ -372,7 +372,7 @@ func (b *AutoscalingGroupModelBuilder) buildAutoScalingGroupTask(c *fi.ModelBuil
|
||||||
}
|
}
|
||||||
|
|
||||||
if extLB.TargetGroupARN != nil {
|
if extLB.TargetGroupARN != nil {
|
||||||
t.TargetGroupARNs = append(t.TargetGroupARNs, &awstasks.TargetGroup{Name: extLB.TargetGroupARN, ARN: extLB.TargetGroupARN})
|
t.TargetGroups = append(t.TargetGroups, &awstasks.TargetGroup{Name: extLB.TargetGroupARN, ARN: extLB.TargetGroupARN})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -87,8 +87,8 @@ type AutoscalingGroup struct {
|
||||||
SuspendProcesses *[]string
|
SuspendProcesses *[]string
|
||||||
// Tags is a collection of keypairs to apply to the node on launch
|
// Tags is a collection of keypairs to apply to the node on launch
|
||||||
Tags map[string]string
|
Tags map[string]string
|
||||||
// TargetGroupARNs is a list of ALB/NLB target group ARNs to add to the autoscaling group
|
// TargetGroups is a list of ALB/NLB target group ARNs to add to the autoscaling group
|
||||||
TargetGroupARNs []*TargetGroup
|
TargetGroups []*TargetGroup
|
||||||
}
|
}
|
||||||
|
|
||||||
var _ fi.CompareWithID = &AutoscalingGroup{}
|
var _ fi.CompareWithID = &AutoscalingGroup{}
|
||||||
|
|
@ -121,7 +121,7 @@ func (e *AutoscalingGroup) Find(c *fi.Context) (*AutoscalingGroup, error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, tg := range g.TargetGroupARNs {
|
for _, tg := range g.TargetGroupARNs {
|
||||||
actual.TargetGroupARNs = append(actual.TargetGroupARNs, &TargetGroup{ARN: aws.String(*tg)})
|
actual.TargetGroups = append(actual.TargetGroups, &TargetGroup{ARN: aws.String(*tg)})
|
||||||
}
|
}
|
||||||
|
|
||||||
if g.VPCZoneIdentifier != nil {
|
if g.VPCZoneIdentifier != nil {
|
||||||
|
|
@ -280,7 +280,7 @@ func (v *AutoscalingGroup) RenderAWS(t *awsup.AWSAPITarget, a, e, changes *Autos
|
||||||
request.LoadBalancerNames = append(request.LoadBalancerNames, k.GetName())
|
request.LoadBalancerNames = append(request.LoadBalancerNames, k.GetName())
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, tg := range e.TargetGroupARNs {
|
for _, tg := range e.TargetGroups {
|
||||||
request.TargetGroupARNs = append(request.TargetGroupARNs, tg.ARN)
|
request.TargetGroupARNs = append(request.TargetGroupARNs, tg.ARN)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -787,7 +787,7 @@ func (_ *AutoscalingGroup) RenderTerraform(t *terraform.TerraformTarget, a, e, c
|
||||||
}
|
}
|
||||||
terraform.SortLiterals(tf.LoadBalancers)
|
terraform.SortLiterals(tf.LoadBalancers)
|
||||||
|
|
||||||
for _, tg := range e.TargetGroupARNs {
|
for _, tg := range e.TargetGroups {
|
||||||
tf.TargetGroupARNs = append(tf.TargetGroupARNs, tg.TerraformLink())
|
tf.TargetGroupARNs = append(tf.TargetGroupARNs, tg.TerraformLink())
|
||||||
}
|
}
|
||||||
terraform.SortLiterals(tf.TargetGroupARNs)
|
terraform.SortLiterals(tf.TargetGroupARNs)
|
||||||
|
|
@ -1023,7 +1023,7 @@ func (_ *AutoscalingGroup) RenderCloudformation(t *cloudformation.Cloudformation
|
||||||
cf.LoadBalancerNames = append(cf.LoadBalancerNames, k.CloudformationLink())
|
cf.LoadBalancerNames = append(cf.LoadBalancerNames, k.CloudformationLink())
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, tg := range e.TargetGroupARNs {
|
for _, tg := range e.TargetGroups {
|
||||||
cf.TargetGroupARNs = append(cf.TargetGroupARNs, tg.CloudformationLink())
|
cf.TargetGroupARNs = append(cf.TargetGroupARNs, tg.CloudformationLink())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue