kubernetes / website

Kubernetes website and documentation repo:
https://kubernetes.io
Creative Commons Attribution 4.0 International
4.37k stars 14.12k forks source link

"Using kubectl to Create a Deployment" tutorial not compatible with ARM architecture #45420

Open tomboulos opened 4 months ago

tomboulos commented 4 months ago

I follow the directions to create the kubernetes-bootcamp deployment using image: gcr.io/google-samples/kubernetes-bootcamp:v1 and the following outputs for the given commands:

% kubectl get deployments
NAME                  READY   UP-TO-DATE   AVAILABLE   AGE
kubernetes-bootcamp   0/1     1            0           9s

% kubectl get pods
NAME                                  READY   STATUS             RESTARTS     AGE
kubernetes-bootcamp-f95c5b745-5cz6n   0/1     CrashLoopBackOff   1 (7s ago)   17s

% kubectl events
LAST SEEN             TYPE      REASON                    OBJECT                                     MESSAGE
7m16s                 Normal    Starting                  Node/minikube                              Starting kubelet.
7m16s                 Normal    NodeHasSufficientPID      Node/minikube                              Node minikube status is now: NodeHasSufficientPID
7m16s                 Normal    NodeHasNoDiskPressure     Node/minikube                              Node minikube status is now: NodeHasNoDiskPressure
7m16s                 Normal    NodeHasSufficientMemory   Node/minikube                              Node minikube status is now: NodeHasSufficientMemory
7m16s                 Normal    NodeAllocatableEnforced   Node/minikube                              Updated Node Allocatable limit across pods
7m11s                 Normal    NodeReady                 Node/minikube                              Node minikube status is now: NodeReady
7m4s                  Normal    RegisteredNode            Node/minikube                              Node minikube event: Registered Node minikube in Controller
7m2s                  Normal    Starting                  Node/minikube                              
3m13s                 Normal    ScalingReplicaSet         Deployment/kubernetes-bootcamp             Scaled up replica set kubernetes-bootcamp-f95c5b745 to 1
3m13s                 Normal    Scheduled                 Pod/kubernetes-bootcamp-f95c5b745-5cz6n    Successfully assigned default/kubernetes-bootcamp-f95c5b745-5cz6n to minikube
3m13s                 Normal    SuccessfulCreate          ReplicaSet/kubernetes-bootcamp-f95c5b745   Created pod: kubernetes-bootcamp-f95c5b745-5cz6n
3m11s                 Normal    Pulling                   Pod/kubernetes-bootcamp-f95c5b745-5cz6n    Pulling image "gcr.io/google-samples/kubernetes-bootcamp:v1"
3m4s                  Normal    Pulled                    Pod/kubernetes-bootcamp-f95c5b745-5cz6n    Successfully pulled image "gcr.io/google-samples/kubernetes-bootcamp:v1" in 7.327s (7.327s including waiting)
102s (x4 over 3m3s)   Normal    Pulled                    Pod/kubernetes-bootcamp-f95c5b745-5cz6n    Container image "gcr.io/google-samples/kubernetes-bootcamp:v1" already present on machine
102s (x5 over 3m4s)   Normal    Started                   Pod/kubernetes-bootcamp-f95c5b745-5cz6n    Started container kubernetes-bootcamp
102s (x5 over 3m4s)   Normal    Created                   Pod/kubernetes-bootcamp-f95c5b745-5cz6n    Created container kubernetes-bootcamp
90s (x9 over 3m2s)    Warning   BackOff                   Pod/kubernetes-bootcamp-f95c5b745-5cz6n    Back-off restarting failed container kubernetes-bootcamp in pod kubernetes-bootcamp-f95c5b745-5cz6n_default(e8322e11-e1a3-4f09-b38a-7b4ba4b828fb)

Note that on the next step when doing the various commands like kubectl logs and kubectl exec the result is: exec /bin/sh: exec format error and a quick websearch indicates it's likely your docker image was build on linux so can only successfully run on a linux machine -- I tried this also on my linux machine and it worked without entering the crash loop and the logs and exec commands work. Please at least update the docs to indicate that it won't work on mac.

k8s-ci-robot commented 4 months ago

This issue is currently awaiting triage.

SIG Docs takes a lead on issue triage for this website, but any Kubernetes member can accept issues by applying the triage/accepted label.

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

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.
dipesh-rawat commented 4 months ago

Page mentioned in issue: https://kubernetes.io/docs/tutorials/kubernetes-basics/deploy-app/deploy-intro/ /language en

dipesh-rawat commented 4 months ago

/retitle "Using kubectl to Create a Deployment" tutorial not compatible with ARM architecture

dipesh-rawat commented 4 months ago

Note: 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.

@tomboulos There is already a note included addressing this concern on the tutorial page. It's situated at the beginning of the tutorial. It acknowledges the limitation regarding the use of a container requiring the AMD64 architecture.

dipesh-rawat commented 4 months ago

/priority awaiting-more-evidence

k8s-triage-robot commented 1 month ago

The Kubernetes project currently lacks enough contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

You can:

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

k8s-triage-robot commented 2 weeks ago

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

You can:

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten