kubernetes簡單命令列模式記錄
阿新 • • 發佈:2020-12-28
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: / ......
待擴充套件。。。