首页 > Web开发 > 详细

kubernetes简单命令行模式记录

时间:2020-12-28 16:21:27      阅读:21      评论:0      收藏:0      [点我收藏+]

1.创建harbor的secret,可以从harbor私有仓库直接拉取镜像

kubectl create secret  docker-registry  registry-harbor --docker-server=harbor.dinghc.com --docker-username=admin --docker-password=123456 -n kube-system

#对应yaml
    spec:
      containers:
      - name: umspzm-service
        image: harbor.dev.sheca.com:30890/umspzm/umsp:v5-for-zmyd-feature
        imagePullPolicy: IfNotPresent
      .............
      imagePullSecrets:   #spec层级下面
      - name: registry-harbor  

2.创建tls(traefik的https)

kubectl create secret tls traefik-cert --key /ssl/intra.sheca.com.key --cert /ssl/intra.sheca.com.cer -n uat
#对应yaml

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: .....
  namespace: uat
  annotations:
    kubernetes.io/ingress.class: "traefik"
    nginx.ingress.kubernetes.io/ssl-redirect: ‘false‘
    traefik.ingress.kubernetes.io/session-cookie-name: "....."
spec:
  tls:
  - secretName: traefik-cert
  rules:
  - host: .........
    http:
      paths:
      - path: /
      ......

待扩展。。。

kubernetes简单命令行模式记录

原文:https://www.cnblogs.com/dinghc/p/14201288.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!