me icon indicating copy to clipboard operation
me copied to clipboard

学习 Kubernetes (Part 2: Minikube)

Open nonocast opened this issue 2 years ago • 0 comments

前提

  • 切记不要用M1的macOS去尝试minikube,否则很容易在arch不一致上出问题,比如luajit不支持arm64, 又或者打包出来的image只能支持amd64,最直接的方式就是找台云服务器会简单很多。

从零配置

安装

国内加速

  • #74 配置docker国内镜像

hello-minikube

  • 创建 Deployment: kubectl create deployment hello-node --image=k8s.gcr.io/echoserver:1.4

跟着官网做第一步就报错 Back-off restarting failed container, 查看错误:

  • kubectl get pods
  • kubectl describe pod pod-id
  • kubectl logs pod-id

然后发现估计错在M1缺少luajit:

kubectl logs hello-minikube-5c5f5cddb9-jprqk -p
2022/08/20 16:18:43 [error] 1#1: failed to initialize Lua VM in /etc/nginx/nginx.conf:54
nginx: [error] failed to initialize Lua VM in /etc/nginx/nginx.conf:54

参考

nonocast avatar Aug 20 '22 16:08 nonocast