Skip to content

Update deploy-intro.html #48170

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

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

kevinjamescasey
Copy link

Description

Add note to alert people that the command might not work on their machine depending on the CPU architecture, because it is difficult for someone trying to learn from the tutorial to have to troubleshoot the problem. At least this will give them a clue.

Issue

#45420

Copy link

linux-foundation-easycla bot commented Oct 3, 2024

CLA Signed

The committers listed above are authorized under a signed CLA.

@k8s-ci-robot k8s-ci-robot added the language/en Issues or PRs related to English language label Oct 3, 2024
@k8s-ci-robot k8s-ci-robot requested a review from sftim October 3, 2024 03:00
@k8s-ci-robot k8s-ci-robot added the cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. label Oct 3, 2024
@k8s-ci-robot
Copy link
Contributor

Welcome @kevinjamescasey!

It looks like this is your first PR to kubernetes/website 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes/website has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@k8s-ci-robot k8s-ci-robot added size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. and removed cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. labels Oct 3, 2024
Copy link

netlify bot commented Oct 3, 2024

Pull request preview available for checking

Built without sensitive environment variables

Name Link
🔨 Latest commit 03fa185
🔍 Latest deploy log https://app.netlify.com/sites/kubernetes-io-main-staging/deploys/678ae7abf15bbf0008726b6c
😎 Deploy Preview https://deploy-preview-48170--kubernetes-io-main-staging.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.

@@ -121,6 +121,7 @@ <h3>kubectl basics</h3>
<a id="deploy-an-app"></a>
<h3>Deploy an app</h3>
<p>Let’s deploy our first app on Kubernetes with the <code>kubectl create deployment</code> command. We need to provide the deployment name and app image location (include the full repository url for images hosted outside Docker Hub).</p>
<div class="alert alert-info note callout" role="alert"><strong>Note:</strong> This only works on certain CPU architectures and may not work on your machine.</div>
Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks

Can we use a note shortcode here? See https://kubernetes.io/docs/contribute/style/hugo-shortcodes/

Copy link
Author

Choose a reason for hiding this comment

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

Yeah. Those docs don't explicitly mention a note shortcode, but I do see {{< note >}} used in some places. So I guess that is a shortcode.

I now see a note at the top of the page, so maybe this note is not needed.

The note at the top is easy to disregard. It is not until after the kubectl create deployment and kubectl get deployments that you find out that the image will not work.

Perhaps that is the best place to mention something like "If you see 0/1 ready then you will need to use a different image that was works on your machine, a machine with an AMD64 CPU, or a driver that can emulate AMD64"

Most of the tutorial still works if you use the registry.k8s.io/e2e-test-images/agnhost:2.39 image from the Hello Minikube page. That image is built for multiple architectures. It is a shame to tell someone at the start of the tutorial that "it might not work on your machine". I think they would prefer to focus on getting through most of the tutorial content rather than being distracted by this issue. The only part I've found that doesn't work with that image is the cat server.js command in Viewing Pods and Nodes.

The note at the top doesn't really explain what to do to make it work. I'm assuming that installing Docker Desktop is required. Since I can legally get Docker Desktop for free, I'll try it. I don't know if there is some other way to get the appropriate driver. I don't really even know what "driver" means in this context.

Copy link
Author

Choose a reason for hiding this comment

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

After much investigating I figured out how to run the tutorial's image successfully on an Apple chip. I update the note at the top of the page to make it clear what to do.

It can still be easily be overlooked, because it requires the reader to recognize the chip architecture name/code mentioned and know that it doesn't match their machine.

@kevinjamescasey kevinjamescasey requested a review from sftim October 4, 2024 14:06
Copy link

@kmeraz kmeraz left a comment

Choose a reason for hiding this comment

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

Hi @kevinjamescasey I'm an independent developer unaffiliated with this project and I just ran into this same issue (I'm on Apple silicon).

I tried running the command you noted (minikube start driver=docker) but no luck. I'm guessing I need to have Docker Desktop installed in order to utilize that flag.

I think that, even if we can't get that specific image working for the tutorial, including the note that you're adding is a step in the right direction 😄

@@ -30,7 +30,9 @@ <h3>Kubernetes Deployments</h3>
{{< note >}}
<p>This tutorial uses a container that requires the AMD64 architecture. If you are using
minikube on a computer with a different CPU architecture, you could try using minikube with
a driver that can emulate AMD64. For example, the Docker Desktop driver can do this.</p>
a driver that can emulate AMD64. For example, the Docker Desktop driver can do this. You can
make sure Docker Deskstop is running when you issue your first `minikube start` command. If
Copy link

Choose a reason for hiding this comment

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

Nit: typo Deskstop

@k8s-ci-robot k8s-ci-robot added cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Dec 19, 2024
@kevinjamescasey
Copy link
Author

I tried running the command you noted (minikube start driver=docker) but no luck. I'm guessing I need to have Docker Desktop installed in order to utilize that flag.

Yes, I believe your guess is correct. I don't remember the details, but I have this note from a post on my own website.

Use minikube start to create a Kubernetes cluster. minikube start --driver=docker allows amd64 images to run on arm64 machines, but it requires Docker Desktop to be installed and running. It will be the default driver if Docker Desktop is running, otherwise qemu2 is the default which apparently comes with the Minikube (at least when installed by Homebrew). Use minikube status to see the current state.

If Docker Desktop is the default and someone running on Apple silicon happens to already have it installed and running, then the tutorial should work for them.

I think that, even if we can't get that specific image working for the tutorial, including the note that you're adding is a step in the right direction 😄

I hope the extra clarifications can get merged in and help some people, but I think switching the tutorial to use a multi-architecture image (like the one in the Hello Minikube tutorial) that just works for almost everyone would be better overall. That way people wouldn't have to get distracted by esoteric caveats. They can just focus on learning the tutorial's intended lesson.

@sftim
Copy link
Contributor

sftim commented Jan 14, 2025

@kevinjamescasey you must provide a valid copyright licence before we can accept this change - see https://api.easycla.lfx.linuxfoundation.org/v2/repository-provider/github/sign/18706487/51478266/48170/#/?version=2

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign natalisucks for approval. For more information see the Code Review Process.

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

Add note to alert people that the command might not work on their machine depending on the CPU architecture
Explain how to ensure `docker` driver is used for non-AMD64 users.
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. and removed cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. labels Jan 17, 2025
@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Apr 7, 2025
@k8s-ci-robot
Copy link
Contributor

PR needs rebase.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. language/en Issues or PRs related to English language needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants