k8s 拉取私有仓库
1:先创建secretkubectl create secret docker-registry myregistrykey --docker-server=192.168.1.222 --docker-username=admin --docker-password=Harbor12345 --docker-email=DOCKER_EMAIL 2:在yaml中加入secreta...
1:先创建secret
kubectl create secret docker-registry myregistrykey --docker-server=192.168.1.222 --docker-username=admin --docker-password=Harbor12345 --docker-email=DOCKER_EMAIL
2:在yaml中加入secret
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: kube-node
spec:
replicas: 2
template:
metadata:
labels:
app: springboot
spec:
containers:
- name: springboot-node
image: 192.168.1.222/hudechun/springboot
ports:
- containerPort: 8081
imagePullSecrets:
- name: myregistrykey
更多推荐
所有评论(0)