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 a kops example with easy setup script #279

Merged
merged 1 commit into from
Oct 12, 2021

Conversation

nckturner
Copy link
Contributor

@nckturner nckturner commented Oct 11, 2021

  • Add makefile target kops-example which calls ./hack/kops-example.sh.
  • Use a kustomize overlay to separate cloud-controller-manager and cloud
    provider specific configuration.

End of output showing teardown command:

Cluster is starting.  It should be ready in a few minutes.

Suggestions:
 * validate cluster: kops validate cluster --wait 10m
 * list nodes: kubectl get nodes --show-labels
 * ssh to the master: ssh -i ~/.ssh/id_rsa ubuntu@api.aws-external-cloud-provider-example.k8s.local
 * the ubuntu user is specific to Ubuntu. If not using Ubuntu please use the appropriate user based on your OS.
 * read about installing addons at: https://kops.sigs.k8s.io/operations/addons.

In order to clean up the cluster, run the following:
  /tmp/kops delete cluster aws-external-cloud-provider-example.k8s.local --v=2 --yes
~/Projects/cloud-provider-aws

What type of PR is this?

/kind documentation

What this PR does / why we need it:
Add a working example of kops configuration to this repository and an easy start setup script.

Does this PR introduce a user-facing change?:

NONE

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. kind/documentation Categorizes issue or PR as related to documentation. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Oct 11, 2021
@nckturner
Copy link
Contributor Author

/cc @wongma7 @rifelpet

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 11, 2021
@rifelpet
Copy link
Member

LGTM. Might be worth printing the instructions on how to tear down the cluster afterwards

@nckturner
Copy link
Contributor Author

LGTM. Might be worth printing the instructions on how to tear down the cluster afterwards

Good idea, updated to print a teardown command at the end of cluster creation.

@nckturner
Copy link
Contributor Author

/hold
Still working on fleshing out the related documentation.

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Oct 11, 2021

1. Temporarily stop the kube-controller-managers from running.
1. Temporarily stop the kube controller managers from running. This might be
Copy link
Contributor

Choose a reason for hiding this comment

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

almost all users will have KCMs in HA configuration, they might misinterpret this to mean that they are forced to take down both KCMs which is disruptive. Should mention the HA case specificlly and that leader election feature gate as a prerequisite

- Add makefile target `kops-example` which calls `./hack/kops-example.sh`.
- Use a kustomize overlay to separate cloud-controller-manager and cloud
  provider specific configuration.
1. Add the tag kubernetes.io/cluster/your_cluster_id=owned (if resources are owned and managed by the cluster) or kubernetes.io/cluster/your_cluster_id=shared (if resources are shared between clusters, and should not be destroyed if the cluster is destroyed) to your instances.
1. Apply the kustomize configuration:
`kubectl apply -k 'github.com/kubernetes/cloud-provider-aws/manifests/base/?ref=master'`
1. Add the tag kubernetes.io/cluster/your_cluster_id=owned (if resources are
Copy link
Contributor

Choose a reason for hiding this comment

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

which resource need this tag?
and do we really honer the tag value..

Copy link
Contributor

@M00nF1sh M00nF1sh left a comment

Choose a reason for hiding this comment

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

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 12, 2021
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: M00nF1sh, nckturner

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

The pull request process is described 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

@nckturner
Copy link
Contributor Author

/unhold

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Oct 12, 2021
@k8s-ci-robot k8s-ci-robot merged commit 59ae724 into kubernetes:master Oct 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/documentation Categorizes issue or PR as related to documentation. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesn't merit a release note. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants