You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
762 B

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

# 创建注册仓库信息
kubectl create secret docker-registry regcred --docker-server=registry.cn-hangzhou.aliyuncs.com --docker-username=东师黄海 --docker-password=DsideaL4r5t6y7u --docker-email=10402852@qq.com
返回信息:
secret/regcred created
# 创建发布和服务
kubectl apply -f ds-base-deployment.yaml
kubectl apply -f ds-base-service.yaml
kubectl apply -f ds-base-web-deployment.yaml
kubectl apply -f ds-base-web-service.yaml
# 查看创建情况
kubectl get pods
kubectl get services
# 临时扩容为2个容器
kubectl scale deployments ds-base --replicas=2
#持久扩容为2个容器
编辑 ds-base-deployment.yaml将 spec.replicas 的值设置为 2然后
kubectl apply -f ds-base-deployment.yaml