╭─root@OpenWrt ~ ╰─# cat /proc/cpuinfo processor : 0 model name : ARMv8 Processor rev 4 (v8l) BogoMIPS : 48.00 Features : fp asimd evtstrm aes pmull sha1 sha2 crc32 cpuid CPU implementer : 0x41 CPU architecture: 8 CPU variant : 0x0 CPU part : 0xd03 CPU revision : 4
processor : 1 model name : ARMv8 Processor rev 4 (v8l) BogoMIPS : 48.00 Features : fp asimd evtstrm aes pmull sha1 sha2 crc32 cpuid CPU implementer : 0x41 CPU architecture: 8 CPU variant : 0x0 CPU part : 0xd03 CPU revision : 4
processor : 2 model name : ARMv8 Processor rev 4 (v8l) BogoMIPS : 48.00 Features : fp asimd evtstrm aes pmull sha1 sha2 crc32 cpuid CPU implementer : 0x41 CPU architecture: 8 CPU variant : 0x0 CPU part : 0xd03 CPU revision : 4
processor : 3 model name : ARMv8 Processor rev 4 (v8l) BogoMIPS : 48.00 Features : fp asimd evtstrm aes pmull sha1 sha2 crc32 cpuid CPU implementer : 0x41 CPU architecture: 8 CPU variant : 0x0 CPU part : 0xd03 CPU revision : 4
将 HDMI 线连接到盒子的 HDMI 口,将 USB 公对公的数据线分别插在盒子的靠近 HDMI 口的 USB ,另一头插在 PC 的 USB 口,再将鼠标连接到盒子的另一个 USB 口。插好上述的线缆之后插上电源开机,由于盒子没有电源开关所以只能通过插拔电源的方式开关机。开机之后会自动进入到电视盒子系统的页面,然后挪动鼠标,在 固件版本 那里狂点鼠标四下开启 ADB 调试模式。屏幕中间会弹出个灰色的方框提示打开 adb
要拔掉 USB 公对公的线,盒子开机后使用 bat 脚本进入线刷模式,在 update 模式下才可以从我们刚刚写入的镜像 U 盘中启动。如果你下载好 Google Drive 上的资源的话,工具在 /玩法0--各种玩法必备工具/2---进线刷模式工具---启动U盘系统前要先进线刷模式/进线刷模式工具 下的
修改一下 lan 网口的 IP 为你内网可访问到的 IP 即可,这样我们就可以使用该 IP 访问 OpenWrt 系统了
安装必备工具
1 2 3 4 5 6
# 首先修改一下 opkg 源,默认给修改为中科大的代理镜像站了,这点不错 ╭─root@OpenWrt /mnt ╰─# opkg update Downloading https://openwrt.proxy.ustclug.org/snapshots/targets/armvirt/64/packages/Packages.gz Updated list of available packages in /var/opkg-lists/openwrt_core Downloading
╭─root@OpenWrt /mnt ╰─# opkg install git zsh git-http ca-bundle ca-certificates wget curl Package git (2.25.1-1) installed in root is up to date. Package zsh (5.7.1-1) installed in root is up to date. Package git-http (2.25.1-1) installed in root is up to date. Package ca-bundle (20190110-2) installed in root is up to date. Package ca-certificates (20190110-2) installed in root is up to date. Upgrading wget on root from 1.20.3-2 to 1.20.3-3... Downloading https://openwrt.proxy.ustclug.org/snapshots/packages/aarch64_generic/packages/wget_1.20.3-3_aarch64_generic.ipk Multiple packages (librt and librt) providing same name marked HOLD or PREFER. Using latest. Upgrading curl on root from 7.66.0-1 to 7.68.0-1... Downloading https://openwrt.proxy.ustclug.org/snapshots/packages/aarch64_generic/base/curl_7.68.0-1_aarch64_generic.ipk Configuring curl. Configuring wget.
Whereas desktop distributions use glib+dbus+udev(part of systemd), OpenWrt uses libubox+ubus+hotplug2. This provides some pretty awesome functionality without requiring huge libraries with huge dependencies (cough glib).
COMMANDS: server Run management server agent Run node agent kubectl Run kubectl crictl Run crictl ctr Run ctr check-config Run config check help, h Shows a list of commands or helpfor one command
GLOBAL OPTIONS: --debug Turn on debug logs [$K3S_DEBUG] --help, -h show help --version, -v print the version
╭─root@OpenWrt ~ ╰─# k3s server INFO[2020-03-08T20:17:00.103499172+08:00] Starting k3s v1.17.3+k3s1 (5b17a175) INFO[2020-03-08T20:17:00.112443368+08:00] Kine listening on unix://kine.sock INFO[2020-03-08T20:17:01.572347551+08:00] Active TLS secret (ver=) (count 7): map[listener.cattle.io/cn-10.43.0.1:10.43.0.1 listener.cattle.io/cn-127.0.0.1:127.0.0.1 listener.cattle.io/cn-192.168.0.212:192.168.0.212 listener.cattle.io/cn-kubernetes:kubernetes listener.cattle.io/cn-kubernetes.default:kubernetes.default listener.cattle.io/cn-kubernetes.default.svc.cluster.local:kubernetes.default.svc.cluster.local listener.cattle.io/cn-localhost:localhost listener.cattle.io/hash:089b0c6a0b78e5f9d3a33b154e97185f644ed693bee80d4559c47e00f19af2f8] INFO[2020-03-08T20:17:01.591244044+08:00] Running kube-apiserver --advertise-port=6443 --allow-privileged=true --anonymous-auth=false --api-audiences=unknown --authorization-mode=Node,RBAC --basic-auth-file=/var/lib/rancher/k3s/server/cred/passwd --bind-address=127.0.0.1 --cert-dir=/var/lib/rancher/k3s/server/tls/temporary-certs --client-ca-file=/var/lib/rancher/k3s/server/tls/client-ca.crt --enable-admission-plugins=NodeRestriction --etcd-servers=unix://kine.sock --insecure-port=0 --kubelet-certificate-authority=/var/lib/rancher/k3s/server/tls/server-ca.crt --kubelet-client-certificate=/var/lib/rancher/k3s/server/tls/client-kube-apiserver.crt --kubelet-client-key=/var/lib/rancher/k3s/server/tls/client-kube-apiserver.key --proxy-client-cert-file=/var/lib/rancher/k3s/server/tls/client-auth-proxy.crt --proxy-client-key-file=/var/lib/rancher/k3s/server/tls/client-auth-proxy.key --requestheader-allowed-names=system:auth-proxy --requestheader-client-ca-file=/var/lib/rancher/k3s/server/tls/request-header-ca.crt --requestheader-extra-headers-prefix=X-Remote-Extra- --requestheader-group-headers=X-Remote-Group --requestheader-username-headers=X-Remote-User --secure-port=6444 --service-account-issuer=k3s --service-account-key-file=/var/lib/rancher/k3s/server/tls/service.key --service-account-signing-key-file=/var/lib/rancher/k3s/server/tls/service.key --service-cluster-ip-range=10.43.0.0/16 --storage-backend=etcd3 --tls-cert-file=/var/lib/rancher/k3s/server/tls/serving-kube-apiserver.crt --tls-private-key-file=/var/lib/rancher/k3s/server/tls/serving-kube-apiserver.key Flag --basic-auth-file has been deprecated, Basic authentication mode is deprecated and will be removed in a future release. It is not recommended for production environments. I0308 20:17:01.593861 9319 server.go:622] external host was not specified, using 192.168.0.212 I0308 20:17:01.594884 9319 server.go:163] Version: v1.17.3+k3s1 I0308 20:17:04.485872 9319 plugins.go:158] Loaded 11 mutating admission controller(s) successfully in the following order: NamespaceLifecycle,LimitRanger,ServiceAccount,NodeRestriction,TaintNodesByCondition,Priority,DefaultTolerationSeconds,DefaultStorageClass,StorageObjectInUseProtection,MutatingAdmissionWebhook,RuntimeClass. I0308 20:17:04.485954 9319 plugins.go:161] Loaded 7 validating admission controller(s) successfully in the following order: LimitRanger,ServiceAccount,Priority,PersistentVolumeClaimResize,ValidatingAdmissionWebhook,RuntimeClass,ResourceQuota. I0308 20:17:04.491004 9319 plugins.go:158] Loaded 11 mutating admission controller(s) successfully in the following order: NamespaceLifecycle,LimitRanger,ServiceAccount,NodeRestriction,TaintNodesByCondition,Priority,DefaultTolerationSeconds,DefaultStorageClass,StorageObjectInUseProtection,MutatingAdmissionWebhook,RuntimeClass. I0308 20:17:04.491084 9319 plugins.go:161] Loaded 7 validating admission controller(s) successfully in the following order: LimitRanger,ServiceAccount,Priority,PersistentVolumeClaimResize,ValidatingAdmissionWebhook,RuntimeClass,ResourceQuota. I0308 20:17:04.592193 9319 master.go:267] Using reconciler: lease I0308 20:17:04.699310 9319 rest.go:115] the default service ipfamily for this cluster is: IPv4 W0308 20:17:06.161374 9319 genericapiserver.go:404] Skipping API batch/v2alpha1 because it has no resources. W0308 20:17:06.212135 9319 genericapiserver.go:404] Skipping API discovery.k8s.io/v1alpha1 because it has no resources. W0308 20:17:06.264606 9319 genericapiserver.go:404] Skipping API node.k8s.io/v1alpha1 because it has no resources. W0308 20:17:06.361403 9319 genericapiserver.go:404] Skipping API rbac.authorization.k8s.io/v1alpha1 because it has no resources. W0308 20:17:06.379432 9319 genericapiserver.go:404] Skipping API scheduling.k8s.io/v1alpha1 because it has no resources. W0308 20:17:06.447661 9319 genericapiserver.go:404] Skipping API storage.k8s.io/v1alpha1 because it has no resources. W0308 20:17:06.550084 9319 genericapiserver.go:404] Skipping API apps/v1beta2 because it has no resources. W0308 20:17:06.550168 9319 genericapiserver.go:404] Skipping API apps/v1beta1 because it has no resources. I0308 20:17:06.599929 9319 plugins.go:158] Loaded 11 mutating admission controller(s) successfully in the following order: NamespaceLifecycle,LimitRanger,ServiceAccount,NodeRestriction,TaintNodesByCondition,Priority,DefaultTolerationSeconds,DefaultStorageClass,StorageObjectInUseProtection,MutatingAdmissionWebhook,RuntimeClass. I0308 20:17:06.600017 9319 plugins.go:161] Loaded 7 validating admission controller(s) successfully in the following order: LimitRanger,ServiceAccount,Priority,PersistentVolumeClaimResize,ValidatingAdmissionWebhook,RuntimeClass,ResourceQuota. I0308 20:17:16.394308 9319 dynamic_cafile_content.go:166] Starting client-ca-bundle::/var/lib/rancher/k3s/server/tls/client-ca.crt I0308 20:17:16.394308 9319 dynamic_cafile_content.go:166] Starting request-header::/var/lib/rancher/k3s/server/tls/request-header-ca.crt I0308 20:17:16.395251 9319 dynamic_serving_content.go:129] Starting serving-cert::/var/lib/rancher/k3s/server/tls/serving-kube-apiserver.crt::/var/lib/rancher/k3s/server/tls/serving-kube-apiserver.key I0308 20:17:16.397910 9319 secure_serving.go:178] Serving securely on 127.0.0.1:6444 I0308 20:17:16.398017 9319 tlsconfig.go:219] Starting DynamicServingCertificateController I0308 20:17:16.398379 9319 autoregister_controller.go:140] Starting autoregister controller I0308 20:17:16.398459 9319 cache.go:32] Waiting for caches to sync for autoregister controller I0308 20:17:16.398723 9319 available_controller.go:386] Starting AvailableConditionController I0308 20:17:16.398794 9319 cache.go:32] Waiting for caches to sync for AvailableConditionController controller I0308 20:17:16.399089 9319 crdregistration_controller.go:111] Starting crd-autoregister controller I0308 20:17:16.399288 9319 shared_informer.go:197] Waiting for caches to sync for crd-autoregister I0308 20:17:16.399546 9319 crd_finalizer.go:263] Starting CRDFinalizer I0308 20:17:16.399790 9319 controller.go:85] Starting OpenAPI controller I0308 20:17:16.400002 9319 customresource_discovery_controller.go:208] Starting DiscoveryController I0308 20:17:16.400341 9319 naming_controller.go:288] Starting NamingConditionController I0308 20:17:16.400638 9319 establishing_controller.go:73] Starting EstablishingController I0308 20:17:16.400854 9319 nonstructuralschema_controller.go:191] Starting NonStructuralSchemaConditionController I0308 20:17:16.401201 9319 apiapproval_controller.go:185] Starting KubernetesAPIApprovalPolicyConformantConditionController I0308 20:17:16.402017 9319 cluster_authentication_trust_controller.go:440] Starting cluster_authentication_trust_controller controller I0308 20:17:16.402094 9319 shared_informer.go:197] Waiting for caches to sync for cluster_authentication_trust_controller I0308 20:17:16.403447 9319 apiservice_controller.go:94] Starting APIServiceRegistrationController I0308 20:17:16.403537 9319 cache.go:32] Waiting for caches to sync for APIServiceRegistrationController controller I0308 20:17:16.403681 9319 controller.go:81] Starting OpenAPI AggregationController I0308 20:17:16.418176 9319 dynamic_cafile_content.go:166] Starting client-ca-bundle::/var/lib/rancher/k3s/server/tls/client-ca.crt I0308 20:17:16.419045 9319 dynamic_cafile_content.go:166] Starting request-header::/var/lib/rancher/k3s/server/tls/request-header-ca.crt I0308 20:17:16.606683 9319 shared_informer.go:204] Caches are synced for cluster_authentication_trust_controller I0308 20:17:16.613199 9319 cache.go:39] Caches are synced for autoregister controller I0308 20:17:16.614373 9319 cache.go:39] Caches are synced for AvailableConditionController controller I0308 20:17:16.614504 9319 shared_informer.go:204] Caches are synced for crd-autoregister I0308 20:17:16.616912 9319 cache.go:39] Caches are synced for APIServiceRegistrationController controller E0308 20:17:16.633217 9319 controller.go:150] Unable to perform initial Kubernetes service initialization: Service "kubernetes" is invalid: spec.clusterIP: Invalid value: "10.43.0.1": cannot allocate resources of type serviceipallocations at this time E0308 20:17:16.639707 9319 controller.go:155] Unable to remove old endpoints from kubernetes service: StorageError: key not found, Code: 1, Key: /registry/masterleases/192.168.0.212, ResourceVersion: 0, AdditionalErrorMsg: I0308 20:17:17.394171 9319 controller.go:107] OpenAPI AggregationController: Processing item I0308 20:17:17.394300 9319 controller.go:130] OpenAPI AggregationController: action for item : Nothing (removed from the queue). I0308 20:17:17.394391 9319 controller.go:130] OpenAPI AggregationController: action for item k8s_internal_local_delegation_chain_0000000000: Nothing (removed from the queue). I0308 20:17:17.431078 9319 storage_scheduling.go:133] created PriorityClass system-node-critical with value 2000001000 I0308 20:17:17.445315 9319 storage_scheduling.go:133] created PriorityClass system-cluster-critical with value 2000000000 I0308 20:17:17.445429 9319 storage_scheduling.go:142] all system priority classes are created successfully or already exist. I0308 20:17:18.939225 9319 controller.go:606] quota admission added evaluator for: roles.rbac.authorization.k8s.io I0308 20:17:19.103599 9319 controller.go:606] quota admission added evaluator for: rolebindings.rbac.authorization.k8s.io W0308 20:17:19.434785 9319 lease.go:224] Resetting endpoints for master service "kubernetes" to [192.168.0.212] I0308 20:17:19.438264 9319 controller.go:606] quota admission added evaluator for: endpoints INFO[2020-03-08T20:17:19.626006745+08:00] Running kube-scheduler --bind-address=127.0.0.1 --kubeconfig=/var/lib/rancher/k3s/server/cred/scheduler.kubeconfig --leader-elect=false --port=10251 --secure-port=0 INFO[2020-03-08T20:17:19.629360634+08:00] Running kube-controller-manager --allocate-node-cidrs=true --bind-address=127.0.0.1 --cluster-cidr=10.42.0.0/16 --cluster-signing-cert-file=/var/lib/rancher/k3s/server/tls/server-ca.crt --cluster-signing-key-file=/var/lib/rancher/k3s/server/tls/server-ca.key --kubeconfig=/var/lib/rancher/k3s/server/cred/controller.kubeconfig --leader-elect=false --port=10252 --root-ca-file=/var/lib/rancher/k3s/server/tls/server-ca.crt --secure-port=0 --service-account-private-key-file=/var/lib/rancher/k3s/server/tls/service.key --use-service-account-credentials=true I0308 20:17:19.655674 9319 controllermanager.go:161] Version: v1.17.3+k3s1 I0308 20:17:19.657868 9319 deprecated_insecure_serving.go:53] Serving insecurely on [::]:10252 INFO[2020-03-08T20:17:19.658915754+08:00] Waiting for cloudcontroller rbac role to be created INFO[2020-03-08T20:17:19.664219593+08:00] Creating CRD addons.k3s.cattle.io INFO[2020-03-08T20:17:19.686759095+08:00] Creating CRD helmcharts.helm.cattle.io W0308 20:17:19.691464 9319 authorization.go:47] Authorization is disabled W0308 20:17:19.691548 9319 authentication.go:92] Authentication is disabled I0308 20:17:19.691602 9319 deprecated_insecure_serving.go:51] Serving healthz insecurely on [::]:10251 INFO[2020-03-08T20:17:19.762954369+08:00] Waiting for CRD helmcharts.helm.cattle.io to become available INFO[2020-03-08T20:17:20.280122513+08:00] Done waiting for CRD helmcharts.helm.cattle.io to become available INFO[2020-03-08T20:17:20.320314726+08:00] Writing static file: /var/lib/rancher/k3s/server/static/charts/traefik-1.81.0.tgz INFO[2020-03-08T20:17:20.321243908+08:00] Writing manifest: /var/lib/rancher/k3s/server/manifests/coredns.yaml INFO[2020-03-08T20:17:20.321700333+08:00] Writing manifest: /var/lib/rancher/k3s/server/manifests/metrics-server/aggregated-metrics-reader.yaml INFO[2020-03-08T20:17:20.322113756+08:00] Writing manifest: /var/lib/rancher/k3s/server/manifests/metrics-server/metrics-apiservice.yaml INFO[2020-03-08T20:17:20.322546305+08:00] Writing manifest: /var/lib/rancher/k3s/server/manifests/metrics-server/metrics-server-deployment.yaml INFO[2020-03-08T20:17:20.322947895+08:00] Writing manifest: /var/lib/rancher/k3s/server/manifests/metrics-server/metrics-server-service.yaml INFO[2020-03-08T20:17:20.323365277+08:00] Writing manifest: /var/lib/rancher/k3s/server/manifests/metrics-server/resource-reader.yaml INFO[2020-03-08T20:17:20.323768992+08:00] Writing manifest: /var/lib/rancher/k3s/server/manifests/traefik.yaml INFO[2020-03-08T20:17:20.324187832+08:00] Writing manifest: /var/lib/rancher/k3s/server/manifests/ccm.yaml INFO[2020-03-08T20:17:20.324764300+08:00] Writing manifest: /var/lib/rancher/k3s/server/manifests/local-storage.yaml INFO[2020-03-08T20:17:20.325164932+08:00] Writing manifest: /var/lib/rancher/k3s/server/manifests/metrics-server/auth-delegator.yaml INFO[2020-03-08T20:17:20.325563897+08:00] Writing manifest: /var/lib/rancher/k3s/server/manifests/metrics-server/auth-reader.yaml INFO[2020-03-08T20:17:20.325996113+08:00] Writing manifest: /var/lib/rancher/k3s/server/manifests/rolebindings.yaml INFO[2020-03-08T20:17:20.527152139+08:00] Starting k3s.cattle.io/v1, Kind=Addon controller INFO[2020-03-08T20:17:20.529057920+08:00] Node token is available at /var/lib/rancher/k3s/server/token INFO[2020-03-08T20:17:20.529286008+08:00] To join node to cluster: k3s agent -s https://192.168.0.212:6443 -t ${NODE_TOKEN} INFO[2020-03-08T20:17:20.527299933+08:00] Waiting for master node startup: resource name may not be empty INFO[2020-03-08T20:17:20.725057527+08:00] Waiting for cloudcontroller rbac role to be created I0308 20:17:20.810135 9319 controller.go:606] quota admission added evaluator for: addons.k3s.cattle.io INFO[2020-03-08T20:17:20.830872877+08:00] Starting helm.cattle.io/v1, Kind=HelmChart controller INFO[2020-03-08T20:17:20.831652182+08:00] Starting batch/v1, Kind=Job controller INFO[2020-03-08T20:17:20.832798326+08:00] Starting /v1, Kind=Service controller INFO[2020-03-08T20:17:20.833998971+08:00] Starting /v1, Kind=Pod controller INFO[2020-03-08T20:17:20.835217450+08:00] Starting /v1, Kind=Endpoints controller INFO[2020-03-08T20:17:20.836690891+08:00] Starting /v1, Kind=Secret controller INFO[2020-03-08T20:17:20.838569298+08:00] Starting /v1, Kind=Node controller
集群状态
1 2 3 4 5 6 7
╭─root@OpenWrt ~ ╰─# ks cluster-info Kubernetes master is running at https://127.0.0.1:6443 CoreDNS is running at https://127.0.0.1:6443/api/v1/namespaces/kube-system/services/kube-dns:dns/proxy Metrics-server is running at https://127.0.0.1:6443/api/v1/namespaces/kube-system/services/https:metrics-server:/proxy
To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'.