Nov 30, 2020
Technology现象
Not Ready:
# kubectl get nodes
ai05 NotReady, SchedulingDisabled node 436d v1.13.5
对策
去掉SchedulingDisabled
:
# kubectl uncordon ai05
NotReady
的解决方法是:
cd /etc/nginx/
mv nginx.conf nginx.conf_sb
某SB改动了此节点上的nginx配置文件,导致该节点无法与正确的api server通信。
更改为正确的nginx.conf
配置:
stream {
upstream kube_apiserver {
least_conn;
server 192.192.185.97:6443;
}
server {
listen 127.0.0.1:6443;
....
}
之前是被SB更改为本机的8021端口到8020端口的映射。
重新启动该节点的kubelet, 但是此时无法正常启动,则:
1. 本机从127.0.0.1:6443切换为192.192.185.97:6443, 通过更改/etc/kubernetes/kubelet.conf。
2. 本机的kube-proxy从127.0.0.1:6443切换为192.192.185.97:6443, 通过更改configmap
3. 删除本机错误的calico。
4. calico提示/run/systemd/resolve/resolv.conf无法找到, 手动创建链接文件。
5. 删除calico/kube-proxy等pod,使之自动创建。
6. 现在nginx-proxy被重新创建,现在开始切换回127.0.0.1:6443
7. 切换回后,删除calico/kube-proxy/nginx-proxy等 pod
8. 现在一切应该正常。
SB的一个误操作,一两个小时就没有了,代价沉重。
Nov 27, 2020
TechnologyPrepare docker images
pull ubuntu latest image:
# sudo docker run -it ubuntu:latest /bin/bash
Install svn and related items in docker:
# sudo apt-get update -y
# sudo apt-get install -y subversion language-pack-zh*
# localedef -c -f UTF-8 -i zh_CN zh_CN.utf8
Commit the docker images:
# sudo docker commit 67ef51b2783e ubuntusvn:latest
Run docker in Intranet
Run svn commit in docker.
# docker run -it -v /media/xxxxxx:/mnt ubuntusvn:latest
# export LC_ALL=zh_CN.UTF_8
# cd /mnt/cloud/
# svn add xfsiso/ubuntu-18.04.5-server-amd64-auto-xfs.iso
# svn ci -m "Added ubuntu18.04.5 server iso" --username=xxxxxx --password=xxxxxx123
Nov 25, 2020
TechnologyImages
Pull:
# sudo docker pull gcr.io/google-containers/ubuntu-nvidia-driver-installer@sha256:7df76a0f0a17294e86f691c81de6bbb7c04a1b4b3d4ea4e7e2cccdc42e1f6d63
# sudo docker pull k8s.gcr.io/nvidia-gpu-device-plugin@sha256:0842734032018be107fa2490c98156992911e3e1f2a21e059ff0105b07dd8e9e
# sudo docker pull nvidia/dcgm-exporter:1.4.3
docker tag and push to inner repository:
root@focal-1:/home/test# docker tag a71c5a2117c0 gcr.io/google-containers/ubuntu-nvidia-driver-installer:rong
root@focal-1:/home/test# docker tag 6527686cc4d1 k8s.gcr.io/nvidia-gpu-device-plugin:rong
root@focal-1:/home/test# docker push gcr.io/google-containers/ubuntu-nvidia-driver-installer:rong
The push refers to repository [gcr.io/google-containers/ubuntu-nvidia-driver-installer]
d09b6f591248: Pushed
72f630252ba2: Pushed
68dda0c9a8cd: Pushed
f67191ae09b8: Pushed
b2fd8b4c3da7: Pushed
0de2edf7bff4: Pushed
rong: digest: sha256:7df76a0f0a17294e86f691c81de6bbb7c04a1b4b3d4ea4e7e2cccdc42e1f6d63 size: 1570
root@focal-1:/home/test# docker push k8s.gcr.io/nvidia-gpu-device-plugin:rong
The push refers to repository [k8s.gcr.io/nvidia-gpu-device-plugin]
179f02762b1a: Pushed
cd7100a72410: Pushed
rong: digest: sha256:0842734032018be107fa2490c98156992911e3e1f2a21e059ff0105b07dd8e9e size: 739
Tips
因为该插件比较老,因而不再需要使用,正确的方式参考:
https://github.com/NVIDIA/k8s-device-plugin
Nov 19, 2020
TechnologySystem Preparation
Install CentOS7.7, minimal mode, then enable root login, login with root.
Disable UseDNS
in sshd
configuration.
[root@cs ~]# cat /etc/yum.conf
[main]
cachedir=/var/cache/yum/$basearch/$releasever
keepcache=1
# yum upate -y
# yum install vim bridge-utils net-tools -y
Nov 12, 2020
Technology安装echarts依赖
Via following commands:
cnpm install echarts -S
cnpm install ngx-echarts -S
cnpm install resize-observer-polyfill -S
如果后面出现 NullInjectorError: No provider for ElementRef!
的问题,则重复执行:
npm install echarts -S
npm install ngx-echarts -S
npm install resize-observer-polyfill -D
创建echarts模块
创建一个名为echarts
的子app:
$ ng g c echarts
Your global Angular CLI version (10.2.0) is greater than your local
version (8.3.28). The local Angular CLI version is used.
To disable this warning use "ng config -g cli.warnings.versionMismatch false".
CREATE src/app/echarts/echarts.component.css (0 bytes)
CREATE src/app/echarts/echarts.component.html (22 bytes)
CREATE src/app/echarts/echarts.component.spec.ts (635 bytes)
CREATE src/app/echarts/echarts.component.ts (273 bytes)
UPDATE src/app/app.module.ts (6586 bytes)
添加导航
添加echarts到导航栏中.