docker和k8s常见问题记录

docker和k8s相关问题记录

1. k8s或docker中运行arthas出现”Unable to get pid of LinuxThreads manager thread”的问题

在镜像中添加init功能,就是将tini添加到镜像中

1
2
3
4
5
FROM openjdk:8-jdk-alpine
COPY ./app.jar /opt/
RUN apk add --no-cache tini
ENTRYPOINT ["/sbin/tini", "--"]
CMD ["java","-jar","/opt/app.jar"]

2. 强制删除pod

1
kubectl delete pod app_pod --grace-period=0 --force

Comments