一、部署步骤

1、创建阿里云镜像仓库

2、创建Secret绑定镜像仓库账号

3、创建Deployment绑定Secret

二、创建阿里云镜像仓库

1、进入阿里云容器镜像服务,创建个人版实例

2、设置登录密码后完成镜像仓库创建

三、创建Secret绑定镜像仓库账号

[root@localhost ~]#  kubectl create secret docker-registry dockerhub --docker-server=registry.cn-hangzhou.aliyuncs.com --docker-username=XXX --docker-password=XXX --namespace=XXX

四、创建Deployment绑定Secret

[root@master ~]# cat >> /root/deployment.yaml <<EOF
apiVersion: apps/v1
kind: Deployment
metadata:
name: hello-world
namespace: kube-system
spec:
replicas: 1
selector:
matchLabels:
app: hello-world
strategy:
rollingUpdate:
maxSurge: 25%
maxUnavailable: 25%
type: RollingUpdate
template:
metadata:
labels:
app: hello-world
spec:
imagePullSecrets:
- name: dockerhub
containers:
- name: hello-world
image: registry.cn-hangzhou.aliyuncs.com/test/hello-world:1d4ac56c-1
imagePullPolicy: IfNotPresent
ports:
- containerPort: 3003
name: http
protocol: TCP
livenessProbe:
failureThreshold: 3
httpGet:
path: /
port: 3003
scheme: HTTP
initialDelaySeconds: 120
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 1
readinessProbe:
failureThreshold: 3
httpGet:
path: /
port: 3003
scheme: HTTP
initialDelaySeconds: 120
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 1
resources:
limits:
memory: 1Gi
requests:
memory: 1Gi
EOF

最新文章

  1. 逻辑回归 Logistic Regression
  2. CentOS7 Tomcat 环境部署
  3. iOS内支付
  4. 利用Oracle自带的impdp和expdp进行简单备份
  5. java 枚举类型知识点记录
  6. 简短总结一下C#里跨线程更新UI(转)
  7. 二. Socket用法
  8. 在VC中集成cURL
  9. 《C专家编程》之一
  10. Spark技术内幕:Stage划分及提交源代码分析
  11. python学习 day13 装饰器(一)&amp;推导式
  12. EF Core 小坑:DbContextPool 会引起数据库连接池连接耗尽
  13. Spring boot 配置https 实现java通过https接口访问
  14. 发布WebApi项目时,提示未包含bin\yourDocumentationFile.xml文档文件
  15. MongoDB pymongo模块
  16. 添加网络ADB的方法(含以太网和无线)
  17. gamit安装
  18. nginx.conf 配置详解
  19. 每月IT摘录201807
  20. PostgreSQL 区域设置

热门文章

  1. A、创建模式(5种)
  2. ES得分
  3. Docker命令(转载)
  4. PyTables学习 (数据保存形式,对象树结构)
  5. 前后端API交互数据加密——AES与RSA混合加密完整实例(转载)
  6. vue super flow 多种形状
  7. 一些test短代码
  8. (四)kafka基础术语
  9. react backend and frontend download file
  10. (jmeter笔记)jmeter远程启用服务器(分布式)