Skip to content

Add CCM quickstart#1027

Open
LogicalShark wants to merge 1 commit intokubernetes:masterfrom
LogicalShark:docs
Open

Add CCM quickstart#1027
LogicalShark wants to merge 1 commit intokubernetes:masterfrom
LogicalShark:docs

Conversation

@LogicalShark
Copy link
Copy Markdown
Contributor

@LogicalShark LogicalShark commented Mar 31, 2026

Fixes #1019

@k8s-ci-robot k8s-ci-robot added the needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. label Mar 31, 2026
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

This issue is currently awaiting triage.

If the repository mantainers determine this is a relevant issue, they will accept it by applying the triage/accepted label and provide further guidance.

The triage/accepted label can be added by org members by writing /triage accepted in a comment.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@k8s-ci-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: LogicalShark

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

The pull request process is described here

Details 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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 31, 2026
@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Mar 31, 2026
@LogicalShark
Copy link
Copy Markdown
Contributor Author

/assign hdp617

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Mar 31, 2026
@LogicalShark LogicalShark force-pushed the docs branch 2 times, most recently from eb87994 to 11f7455 Compare March 31, 2026 21:01
@hdp617
Copy link
Copy Markdown
Contributor

hdp617 commented Mar 31, 2026

  • Could you link this PR to issue Add quickstart doc for running CCM #1019?

  • I'll move the kops-down cleanup changes to a new, dedicated issue to streamline the review process for the CCM quickstart and easier cherrypick if needed.

@LogicalShark LogicalShark changed the title Add CCM quickstart and expand kops-down cleanup Add CCM quickstart Apr 1, 2026
@hdp617
Copy link
Copy Markdown
Contributor

hdp617 commented Apr 2, 2026

For the quickstart, I was approaching it from a customer's perspective: 'What's the fastest way to get a self-managed k8s cluster?' The current approach is great for local dev changes to the component, but I'm more interested in targeting the customer experience here. How about separating this into 2?

  • Quickstart - essentially just run make kops-up.
  • CCM local testing - which is what we have here.

@LogicalShark LogicalShark force-pushed the docs branch 4 times, most recently from 03427c3 to 1cc9372 Compare April 3, 2026 19:08
@k8s-ci-robot k8s-ci-robot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Apr 3, 2026
@LogicalShark LogicalShark force-pushed the docs branch 3 times, most recently from 2ed2381 to 4102b67 Compare April 3, 2026 20:09
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Apr 3, 2026
@LogicalShark LogicalShark force-pushed the docs branch 2 times, most recently from 3d21946 to b9ed23d Compare April 3, 2026 20:11
Signed-off-by: LogicalShark <maralder@google.com>
Copy link
Copy Markdown

@zhang-xuebin zhang-xuebin left a comment

Choose a reason for hiding this comment

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

Nice work, thanks @LogicalShark !

# This automatically extracts your GCE node's service account using kubectl and gcloud.
NODE_NAME=$(kubectl get nodes -o jsonpath='{.items[0].metadata.name}')
NODE_ZONE=$(kubectl get node $NODE_NAME -o jsonpath='{.metadata.labels.topology\.kubernetes\.io/zone}')
NODE_SA=$(gcloud compute instances describe $NODE_NAME \
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

NODE_SA

The kubectl command here may be unnecessary. Looks like this is just getting VM's default SA, right? Why not just use gcloud compute instances describe $VM_name . SInce it's manual cluster, the user should know which VM it is.

- --cloud-provider=gce
- --allocate-node-cidrs=true
- --cluster-cidr=10.4.0.0/14
- --cluster-name=kops-k8s-local
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

cluster-name

Does this always exist? If I just create a cluster using kubeadm, it doesn't have a "cluster-name", no? In this case, should we just make up a name?

> [!NOTE]
> If you skipped building your own image in Step 1 and chose to deploy the public upstream image (`k8scloudprovidergcp/cloud-controller-manager:latest`), you **must** also include `command: ["/cloud-controller-manager"]` in your patch's `containers` block. Locally built Dockerfile images automatically set the correct `ENTRYPOINT`, so they do not require this override!

> [!IMPORTANT]
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

[!IMPORTANT]

This applies as well no matter we build own image, right? i.e. if we build the owner image, we also need to specify these args.

- --use-service-account-credentials=true
- --v=2
EOF
(cd deploy/packages/default && kustomize edit add patch --path args-patch.yaml)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

kustomize edit add patch --path args-patch.yaml

If we use locally built image, there is already is kustomization.yaml in this folder (probably from line 61), how does these two reconcile together?

gcloud compute instances create k8s-master \
--zone=$ZONE \
--machine-type=$MACHINE_TYPE \
--image-family=$IMAGE_FAMILY \
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

curious if IMAGE_FAMILY/IMAGE_PROJECT needed or we can leave it as default?

cat <<EOF > kubeadm-config.yaml
apiVersion: kubeadm.k8s.io/v1beta3
kind: ClusterConfiguration
kubernetesVersion: v1.30.0 # Match the version you installed
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

version you installed

How to find out this?

--scopes=cloud-platform \
--tags=k8s-master

# Worker instances
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I see you created worker VM but I didn't see the worker node joining the cluster, did I miss anything?

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. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. 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.

Add quickstart doc for running CCM

4 participants