请按照 ./database/readme.md 执行
git clone https://github.com/usoftglobal/k8s-seckill.git
请按照 ./image/readme.md 执行
cd k8s-seckill
# 修改部署
# image 改为你推送的远程地址如(registry.cn-shanghai.aliyuncs.com/usoftglobal/seckill:1.0.0)
# replicas 按照实际集群规模修改
vim seckill-deployment.yaml
# 执行部署
kubectl apply -f seckill-deployment.yaml
# 查看 pod 状态,Running 正常
kubectl get pods
# 查看外部端口
kubectl get services
# 结果如下
# NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
# kubernetes ClusterIP 10.96.0.1 <none> 443/TCP 15m
# seckill NodePort 10.111.1.62 <none> 3000:31806/TCP 44s
# 访问测试
http://你的公网IP:31806
# 创建商品
http://你的公网IP:31806/goodsCreate?number=10000
# 秒杀下单
http://你的公网IP:31806/seckill/buy?goods_id=1&number=10