Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add leader election docs #2279

Closed
wants to merge 1 commit into from
Closed

Conversation

pmorie
Copy link
Member

@pmorie pmorie commented Mar 6, 2020

Add docs for leader election in serving. Feedback wanted!

Part of knative/pkg#1007

@knative-prow-robot knative-prow-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Mar 6, 2020
@googlebot googlebot added the cla: yes Indicates the PR's author has signed the CLA. label Mar 6, 2020

It is important to be able to provide an HA control plane that is resilient in
the face of a controller instance unexpectedly dying. Beginning in release 0.13,
Knative provides the ability to leader elect some controllers.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove trailing whitespace:

Suggested change
Knative provides the ability to leader elect some controllers.
Knative provides the ability to leader elect some controllers.

At this point, we've configured the controllers to use leader election and we
can scale the control plane up!

1. Now, you can scale the control plane up.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove trailing whitespace:

Suggested change
1. Now, you can scale the control plane up.
1. Now, you can scale the control plane up.

1. Now, you can scale the control plane up.

```bash
kubectl rollouts restart deployment -n knative-serving controller
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove trailing whitespace:

Suggested change
kubectl rollouts restart deployment -n knative-serving controller
kubectl rollouts restart deployment -n knative-serving controller

## Next steps

You can follow the [feature track](https://github.com/knative/pkg/issues/1007)
to monitor progress as we continue to develop this feature.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add trailing newline:

Suggested change
to monitor progress as we continue to develop this feature.
to monitor progress as we continue to develop this feature.

@knative-prow-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: pmorie
To complete the pull request process, please assign vaikas
You can assign the PR to them by writing /assign @vaikas in a comment when ready.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment


## Next steps

You can follow the [feature track](https://github.com/knative/pkg/issues/1007)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR seems to be closed now, so I'm not sure why we include this? Is there another link to replace it?

Besides mentioning that the feature is still in development, I'm not sure I'd mention any future plans anyway... (https://developers.google.com/style/future).

Any of these deployments can be scaled up once leader election is enabled.

```shell
kubectl scale --replicas=2 controller autoscaler-hpa networking-certmanager networking-ns-cert
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what does this do? Doesn't seem to be explained?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When I just run this command, I am getting an error:

kubectl scale --replicas=2 controller autoscaler-hpa networking-certmanager networking-ns-cert

error: the server doesn't have a resource type "controller"

Some arg/context seems to missing here, so I am not able to set the replicas to 2 ... ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be kubectl scale --replicas=2 deployments ...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suspect this may also need a --namespace argument.

kubectl scale --replicas=2 controller autoscaler-hpa networking-certmanager networking-ns-cert
```

Note: include `networking-istio` if Istio is installed.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to include all the ingress options that can be included, e.g. kourier?

Copy link
Contributor

@abrennan89 abrennan89 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added some review comments, thanks for adding this @pmorie 😄

1. Now, you can scale the control plane up.

```bash
kubectl rollouts restart deployment -n knative-serving controller
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pmorie rollout ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This just restarts the controller ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be removed since it has been done during the previous step?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1, it looks like we run this command on both line 57 and on line 46 immediately preceeding.

@lionelvillard
Copy link
Member

we should also list which eventing components are HA. I tried the eventing controller and it worked :-)

@vaikas
Copy link
Contributor

vaikas commented May 14, 2020

@mattmoor @pmorie with the recent work, can you coordinate the required (if any) changes here? Super cool stuff :)

@mattmoor
Copy link
Member

None of the stuff I'm playing with is relevant to this release, so we should proceed with documenting what we have. Once we've sorted out next steps (next milestone) we should include whatever docs updates we need in that planning as well.

So please don't block this on that stuff 👍

Copy link
Member

@evankanderson evankanderson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Happy to approve, but wanted to check on the two command questions (one missing --namespace, one command seemingly duplicated).

1. Now, you can scale the control plane up.

```bash
kubectl rollouts restart deployment -n knative-serving controller
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1, it looks like we run this command on both line 57 and on line 46 immediately preceeding.

Any of these deployments can be scaled up once leader election is enabled.

```shell
kubectl scale --replicas=2 controller autoscaler-hpa networking-certmanager networking-ns-cert
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suspect this may also need a --namespace argument.

@abrennan89
Copy link
Contributor

@evankanderson this one can probably be closed.
@pmorie didn't really have time to get back to it and I have made some improvements on the new PR. There are open questions still we need to discuss on the other PR #2455 though.

@pmorie wdyt about closing this one?

@abrennan89
Copy link
Contributor

Closing this since the other PR is merged now.

@abrennan89 abrennan89 closed this Jun 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes Indicates the PR's author has signed the CLA. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants