首先在K8S上面部署一个tomcat
到dockerhub上面选择你要使用的tomcat镜像,主要考虑tomcat的版本以及内置的JDK版本.可以通过K8S的自制应用来制作, 过程略 当然, 也可以使用yaml
kind: Deployment
apiVersion: apps/v1
metadata:
name: tomcat-v1
namespace: cvicse-dev
labels:
app: tomcat
app.kubernetes.io/name: tomcat
app.kubernetes.io/version: v1
version: v1
annotations:
deployment.kubernetes.io/revision: '10'
kubesphere.io/creator: admin
servicemesh.kubesphere.io/enabled: 'false'
spec:
replicas: 1
selector:
matchLabels:
app: tomcat
app.kubernetes.io/name: tomcat
app.kubernetes.io/version: v1
version: v1
template:
metadata:
creationTimestamp: null
labels:
app: tomcat
app.kubernetes.io/name: tomcat
app.kubernetes.io/version: v1
version: v1
annotations:
kubesphere.io/restartedAt: '2022-04-03T08:04:58.871Z'
logging.kubesphere.io/logsidecar-confi
|