- Kubernetes 版本:1.18.6
- Dockerfile jdk:1.8_231
- Dockerfile 内容:
FROM harbor.testcbi.com/base/centos-jdk8-ast
MAINTAINER dailiang<dailiang666666@gmail.com>
WORKDIR /data
COPY cbp-user-1.0.0.jar /data/
COPY bootstrap.properties /data/
EXPOSE 8081
ENTRYPOINT ["java","-jar","core-us-1.0.0.jar"]
ConfigMap yaml 内容:
我的部署 yaml:
日志:
[root@master01 ~]# kubectl logs core-us-deployment-6b784c8d96-b9z8b
Improperly specified VM option 'InitialHeapSize=1024m -XX:MaxHeapSize=1024m -XX:MetaspaceSize=84m -XX:MaxMetaspaceSize=240m -XX:+HeapDumpOnOutOfMemoryError'
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
当我将 jvm args 更改为-Xms1024m -Xmx1024m;
Got the following error
[root@master01 ~]# kubectl logs core-us-deployment-6b784c8d96-krfhg
Invalid initial heap size: -Xms1024m -Xmx1024m -XX:MetaspaceSize=84m -XX:MaxMetaspaceSize=240m -XX:+HeapDumpOnOutOfMemoryError
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
我已经google了很长时间,但我仍然没有找到答案。请帮我!!!!