EGX-PLATFORM,kubernets部署使用实践(jetson)

https://github.com/NVIDIA/egx-platform
基于K8s&Helm实现云边协同

https://www.cnblogs.com/zliW/p/12603536.html
阿里源替换国外源

Jetson Xavier NX

1、Xavier NX 以及安装jetpack4.4
2、更新docker配置runtime
3、安装k8s相关组件 kubelet kubectl kubeadm

  • kubelet :运行在 Cluster 所有节点上,主要负责启动 Pod 和容器。
  • kubeadm :用于初始化和引导Cluster(是官方推出快速部署k8s集群,其本质是将k8s的相关服务容器化)
  • kubectl 是 Kubernetes 命令行工具。通过 kubectl 可以部署和管理应用,查看各种资源,创建、删除和更新各种组件

修改apt源为阿里的arm ubuntu1804源

/etc/apt/sources.lsit 创建及添加如下内容
deb http://mirrors.aliyun.com/ubuntu-ports/ bionic main restricted universe multiverse
  
deb-src http://mirrors.aliyun.com/ubuntu-ports/ bionic main restricted universe multiverse

deb http://mirrors.aliyun.com/ubuntu-ports/ bionic-security main restricted universe multiverse

deb-src http://mirrors.aliyun.com/ubuntu-ports/ bionic-security main restricted universe multiverse

deb http://mirrors.aliyun.com/ubuntu-ports/ bionic-updates main restricted universe multiverse

deb-src http://mirrors.aliyun.com/ubuntu-ports/ bionic-updates main restricted universe multiverse

deb http://mirrors.aliyun.com/ubuntu-ports/ bionic-backports main restricted universe multiverse

deb-src http://mirrors.aliyun.com/ubuntu-ports/ bionic-backports main restricted universe multiverse

deb http://mirrors.aliyun.com/ubuntu-ports/ bionic-proposed main restricted universe multiverse

deb-src http://mirrors.aliyun.com/ubuntu-ports/ bionic-proposed main restricted universe multiverse

/etc/apt/sources.list.d/kubernetes.list 创建及添加如下内容
deb https://mirrors.aliyun.com/kubernetes/apt kubernetes-xenial main

curl -s https://mirrors.aliyun.com/kubernetes/apt/doc/apt-key.gpg | sudo apt-key add -
拉取镜像然后执行

拉取镜像
docker pull registry.aliyuncs.com/google_containers/kube-apiserver:v1.17.5
docker pull registry.aliyuncs.com/google_containers/kube-proxy:v1.17.5             
docker pull registry.aliyuncs.com/google_containers/kube-controller-manager:v1.17.5  
docker pull registry.aliyuncs.com/google_containers/kube-scheduler:v1.17.5        
docker pull registry.aliyuncs.com/google_containers/etcd:3.4.3-0         
docker pull registry.aliyuncs.com/google_containers/coredns:1.6.5
docker pull registry.aliyuncs.com/google_containers/pause:3.1 

修改tag
docker tag registry.aliyuncs.com/google_containers/kube-apiserver:v1.17.5 k8s.gcr.io/kube-apiserver:v1.17.5
docker tag registry.aliyuncs.com/google_containers/kube-proxy:v1.17.5 k8s.gcr.io/kube-proxy:v1.17.5
docker tag registry.aliyuncs.com/google_containers/kube-controller-manager:v1.17.5 k8s.gcr.io/kube-controller-manager:v1.17.5
docker tag registry.aliyuncs.com/google_containers/kube-scheduler:v1.17.5 k8s.gcr.io/kube-scheduler:v1.17.5
docker tag registry.aliyuncs.com/google_containers/etcd:3.4.3-0 k8s.gcr.io/etcd:3.4.3-0
docker tag registry.aliyuncs.com/google_containers/coredns:1.6.5 k8s.gcr.io/coredns:1.6.5
docker tag registry.aliyuncs.com/google_containers/pause:3.1 k8s.gcr.io/pause:3.1

sudo kubeadm init --kubernetes-version=v1.17.5 --pod-network-cidr=10.244.0.0/16 --ignore-preflight-errors=Swap
如果不小心init错了 可以重启kubeadm reset

jetson Xavier NX上老是失败

EGX-PLATFORM,kubernets部署使用实践(jetson)_第1张图片
第三步在进行初始化的时候,节点老是报错,目前分析是安装时候没有把组件装全,网络问题?
在这里插入图片描述

服务器上安装是pass的

EGX-PLATFORM,kubernets部署使用实践(jetson)_第2张图片

  • 初始化Kubenetes报错1:[kubelet-check] The HTTP call equal to ‘curl -sSL
    http://localhost:10248/healthz‘ fa?
[root@localhost kubernetes]# vim /etc/systemd/system/kubelet.service.d/10-kubeadm.conf
Environment="KUBELET_SYSTEM_PODS_ARGS=--pod-manifest-path=/etc/kubernetes/manifests --allow-privileged=true --fail-swap-on=false"
[root@localhost kubernetes]# systemctl daemon-reload  
[root@localhost kubernetes]# systemctl restart kubelet

https://blog.csdn.net/qq_44895681/article/details/107413950

你可能感兴趣的:(kubernetes,docker)