Giter Site home page Giter Site logo

mzjtestboot's Introduction

生成镜像

mvn clean package docker:build -DpushImageTag

删除none镜像

docker rmi docker images | grep "<none>" | awk '{print $3}'

创建容器

docker run -d -p 8280:8280 -m 256M --name mzjtestboot mzj:5000/mzjtestboot java -XX:+PrintFlagsFinal -XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap -version | grep MaxHeapSize 结果是 1G / 4 = 256M

测试

先 kubectl get services 获取到 service地址和端口 NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE mzjtestboot-service NodePort 10.97.33.156 8280:31985/TCP 5d16h

访问地址:

curl http://10.97.33.156:8280/mzjtestboot/ curl http://10.97.33.156:8280/mzjtestboot/animal/call

部署Docker Image

kubectl create -f kube.yaml

各种查看

kubectl get deployment -o wide kubectl get rs kubectl get pods kubectl describe pod mzjtestboot-deployment-5bccbcdf89-xrpzx kubectl get services kubectl describe service mzjtestboot-service

使用dashboard

kubectl create -f kubernetes-dashboard.yaml kubectl create -f k8s-admin.yaml

获取token:

kubectl describe serviceaccount admin -n kube-system kubectl describe secret admin-token-pkkhl -n kube-system

访问

https://mzjvm:30001/#!/loginhttp://mzjvm:30002/#!/login

mzjtestboot's People

Contributors

mzj313 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.