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

[WIP] Update docs of snapshot #1100

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

wzshiming
Copy link
Member

What type of PR is this?

/kind documentation

What this PR does / why we need it:

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?

NONE

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:


@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. labels May 21, 2024
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: wzshiming

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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 21, 2024
@k8s-ci-robot k8s-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label May 21, 2024
Copy link

netlify bot commented May 21, 2024

Deploy Preview for k8s-kwok ready!

Name Link
🔨 Latest commit acad636
🔍 Latest deploy log https://app.netlify.com/sites/k8s-kwok/deploys/665034fd0edf6b0008010efa
😎 Deploy Preview https://deploy-preview-1100--k8s-kwok.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@wzshiming wzshiming changed the title Update docs of snapshot [WIP] Update docs of snapshot May 21, 2024
@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels May 21, 2024
# Create an nodes.
kwokctl scale node --replicas 2

# Apply a deployment.
Copy link
Contributor

@network-charles network-charles May 22, 2024

Choose a reason for hiding this comment

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

The demo looks great. However, the user needs to switch contexts before applying a deployment. For beginners new to Kubernetes, this can be confusing, especially if they have been working with a cluster that has a different name beforehand.

Suggestion

# Use context
kubectl cluster-info --context kwok-kwok

# Apply a deployment.

Copy link
Member Author

Choose a reason for hiding this comment

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

But that doesn't switch context, it needs uses:

kubectl config use-context kwok-kwok

and I feel it is enough to add to the demo of the home page
https://kwok.sigs.k8s.io/#getting-started

WDYT?

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh, it's true. I just realized that it only shows details about the DNS name the control plane is running at.
For example:

kubectl cluster-info --context kwok-kwok
Kubernetes control plane is running at https://127.0.0.1:32766

To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'.

Copy link
Contributor

@network-charles network-charles May 23, 2024

Choose a reason for hiding this comment

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

I also noticed that after creating a cluster using kwokctl, it automatically switches the context.
For example:

$ kubectl config current-context
error: current-context is not set

$ kwokctl create cluster
Cluster is creating                                                                                                       cluster=kwok
Cluster is created                                                                                           elapsed=0.9s cluster=kwok
Cluster is starting                                                                                                       cluster=kwok
Cluster is started                                                                                           elapsed=1.9s cluster=kwok
You can now use your cluster with:

        kubectl cluster-info --context kwok-kwok

Thanks for using kwok!

$ kubectl config current-context
kwok-kwok

Copy link
Contributor

@network-charles network-charles May 23, 2024

Choose a reason for hiding this comment

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

It means there is no point in adding this suggestion:

# Use context 
kubectl cluster-info --context kwok-kwok

My sincere apologies. After executing kwokctl create cluster, this statement You can now use your cluster with: confused me.

Copy link
Member Author

Choose a reason for hiding this comment

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

My sincere apologies. After executing kwokctl create cluster, this statement You can now use your cluster with: confused me.

It's modeled on kind.
https://github.com/kubernetes-sigs/kind/blob/bbcc02f84c8efd68d20c3a6585c2f282d7c1b8c9/pkg/cluster/internal/create/create.go#L187-L197

Copy link
Contributor

Choose a reason for hiding this comment

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

True, I surprisingly saw it yesterday while creating a cluster using Kind.
Also, if no cluster name is specified when creating a Kind cluster, it switches to a default context after creating it. It's nice that the same applies to kwok too.

@@ -0,0 +1,31 @@
# Let's getting started with kwokctl!
Copy link
Contributor

@network-charles network-charles May 22, 2024

Choose a reason for hiding this comment

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

See this review above.

@@ -0,0 +1,29 @@
# Let's getting started with kwokctl!
Copy link
Contributor

@network-charles network-charles May 22, 2024

Choose a reason for hiding this comment

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

See this review above.

@wzshiming wzshiming force-pushed the doc/record-and-replay branch 4 times, most recently from 5d65e94 to 0ef5a13 Compare May 23, 2024 08:02
Co-authored-by: Charles Uneze <charlesniklaus@gmail.com>
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. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. kind/documentation Categorizes issue or PR as related to documentation. release-note-none Denotes a PR that doesn't merit a release note. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants