K8S集群容器中集成arthas、netstat即时诊断分析工具(2)

$ exit
/usr/local/arthas # netstat -tlnp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 127.0.0.1:3658 0.0.0.0: LISTEN 6/java
tcp 0 0 0.0.0.0:80 0.0.0.0: LISTEN 6/java
tcp 0 0 127.0.0.1:8563 0.0.0.0:* LISTEN 6/java

6.示例jenkins构建,封装至基础镜像中

cat >./target/Dockerfile <<EOF
FROM 192.168.3.10:5001/library/javabase:v8.0.22
RUN \
mkdir -p /usr/local/ocr
ADD ./app.jar /usr/local/ocr/
WORKDIR /usr/local
EXPOSE 80

ENTRYPOINT ["/sbin/tini", "--"]
CMD ["sh","-c","java -Xms3000m -Xmx3000m -XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap -jar /usr/local/ocr/app.jar"]
EOF

ssh root@192.168.255.1 "/bin/bash /usr/jenkins_home/deploy_history/scf-test/deploy.sh test ocr && \
/usr/bin/kubectl apply -f /usr/jenkins_home/deploy_history/scf-test/test-ocr.yaml && \
exit"

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/33f39fee18572087cdeff581ebb2255f.html