Rencetly I found some k8s nodes became “NotReady”, I checked disk and memory, they both seems fine.
[xxx@xxx-xxx ~]# kubectl describe node xxx-xxx
...
...
Conditions:
Type Status LastHeartbeatTime LastTransitionTime Reason Message
---- ------ ----------------- ------------------ ------ -------
...
PIDPressure False Fri, 10 May 2019 09:24:43 +0900 Fri, 10 May 2018 00:10:12 +0900 KubeletHasSufficientPID kubelet has sufficient PID available
...
Then I restarted kubelet on server and checked logs, I found:
[xxx@xxx-xxx ~]# systemctl status kubelet
● kubelet.service - Kubernetes Kubelet Server
Loaded: loaded (/etc/systemd/system/kubelet.service; enabled; vendor preset: disabled)
...
May 10 12:30:30 xxx-xxx kubelet[16776]: F0322 12:30:30.810434 16776 server.go:233] failed to run Kubelet: Running with swap on is not supported, plea...
...
So I checked server’s status and turn off swap, then I restarted kubelet and the nodes went well.
[xxx@xxx-xxx ~]# swapoff -a
[xxx@xxx-xxx ~]# systemctl restart kubelet
Today I received alert email suddenly which said my blog site went down…😂😂😂
So I logged in server and checked containers’s status, everything looked fine
[root@blog xiaowang]# docker stack ps blog
ID NAME IMAGE NODE DESIRED STATE CURRENT STATE ERROR PORTS
qwsjjol3jk2f blog_mysql.1 mysql:5.7 blog Running Running 15 days ago
n9gbil4zcavy blog_nginx.1 nginx:1.13.8 blog Running Running 15 days ago
hg778gcc35vz blog_wordpress.1 wordpress:4.9.1 blog Running Running 15 days ago
When I checked the port, everything also looked fine
But when I executed “curl http://localhost“, it was blocked, so I guess something wrong with local network.
After checking I executed “sysctl -w net.ipv4.ip_forward=1” to enable ip forward, and I finally could access the port. So I executed “echo “net.ipv4.ip_forward=1″ >> /etc/sysctl.conf” to make it permanent.
I’m using google cloud, I guess maybe they have reset the network which I didn’t make it permanent before.
It’s boring and complicated to manage bigdata platforms, there are so many softwares need to be installed and coordinated to make them work well together, so I tried ambari to manage them.
1.run centos7 container
docker run -dit --name centos7 --privileged --publish 8080:8080 centos:7 /usr/sbin/init
The above steps are configured on single server, if you wanna build cluster with several servers, you also need configure ssh key(please google for specific steps, it’s simple) and start ambari-agent on slave servers.
Below are screenshots of a mini cluster which was built by 4 servers:
Chunyi 22:53 on 2019-07-22 Permalink |
想起了孟哥的域名,上来转一圈~
LikeLike
Mr Wang 10:41 on 2019-07-23 Permalink |
哈哈,华为鸿蒙
LikeLike