k8s tomcat - GunSik2/k8s-mon GitHub Wiki
๋ชฉ์
- K8S ํ๊ฒฝ์์ Tomcat Session ๋ณต์ Cluster ๊ตฌ์ฑํ๊ธฐ
- K8S ํ๊ฒฝ์์ Session์ Redis ์ ๊ฐ์ ์ธ๋ฉ๋ชจ๋ฆฌ ๊ถ์ฅ
- ํ์ง๋ง ์๊ท๋ชจ ์ปจํ ์ด๋ ์ด์ํ๊ฒฝ์ ๊ฒฝ์ฐ ์ ํต์ ์ธ WAS ๋จ์ Session ๋ณต์ ์ฌ์ฉ ๊ฐ๋ฅ
- ๊ฐ๋ฐ์๋ ๋ณ๋์ ์ค์ ๊ณผ ๊ณ ๋ฏผ ์์ด ์ธ์ ์ฌ์ฉ ๊ฐ๋ฅ ์ฅ์
๋ฐฐํฌ ์ ์ฐจ
$ kubectl create -f serviceaccount.yml
serviceaccount/tomcat-in-the-cloud created
role.rbac.authorization.k8s.io/tomcat-in-the-cloud created
rolebinding.rbac.authorization.k8s.io/tomcat-in-the-cloud created
$ kubectl run tomcat-web --image=docker.io/maxbeck/tomcat-in-the-cloud --port 8080 --serviceaccount="tomcat-in-the-cloud"
deployment.apps/tomcat-web created
$ kubectl get deployments
NAME READY UP-TO-DATE AVAILABLE AGE
tomcat-web 1/1 1 1 2m48s
$ kubectl scale deployment tomcat-web --replicas=3
deployment.apps/tomcat-web scaled
$ kubectl get deployments
NAME READY UP-TO-DATE AVAILABLE AGE
tomcat-web 1/3 3 1 3m6s
$ kubectl get service | grep tomcat
tomcat-in-the-cloud ClusterIP None <none> 42/TCP 12m