码迷,mamicode.com
首页 > Web开发 > 详细

kubernetes安装问题记录

时间:2017-11-20 15:41:00      阅读:214      评论:0      收藏:0      [点我收藏+]

标签:kubernetes问题记录

一、pod-infrastructure:latest镜像下载失败

报错一:image pull failed for registry.access.redhat.com/rhel7/pod-infrastructure:latest, this may be because there are no credentials on this request.  details: (open /etc/docker/certs.d/registry.access.redhat.com/redhat-ca.crt: no such file or directory)

解决方案:yum install *rhsm* -y

报错二:Failed to create pod infra container: ImagePullBackOff; Skipping pod "redis-master-jj6jw_default(fec25a87-cdbe-11e7-ba32-525400cae48b)": Back-off pulling image "registry.access.redhat.com/rhel7/pod-infrastructure:latest

解决方法:试试通过手动下载

docker pull registry.access.redhat.com/rhel7/pod-infrastructure:latest


二、POD创建失败

报错:Event(api.ObjectReference{Kind:"ReplicationController", Namespace:"default", Name:"redis-master", UID:"a4f26317-cdbe-11e7-bad0-525400cae48b", APIVersion:"v1", ResourceVersion:"13245", FieldPath:""}): type: ‘Warning‘ reason: ‘FailedCreate‘ Error creating: No API token found for service account "default", retry after the token is automatically created and added to the service account

Nov 20 14:49:22 k8s-master kube-controller-manager: E1120 14:49:22.778739     566 replica

解决方法:关闭api的servicecount,修改/etc/kubernetes/apiserver

KUBE_ADMISSION_CONTROL="--admission_control=NamespaceLifecycle,NamespaceExists,LimitRanger,ResourceQuota"


三、POD测试文件

apiVersion: v1

kind: ReplicationController

metadata: 

  name: redis-master

  labels:

    name: redis

spec:

  replicas: 1

  selector:

    name: redis

  template:

   metadata:

    labels:

      name: redis

   spec:

    containers:

    - name: master

      image: kubeguide/redis-master

      ports:

      - containerPort: 6379


四、启动CNI网络插件:

插件路径:/opt/cni/bin

插件配置文件路径:/etc/cni/net.d

kubelet配置文件添加以下参数

  --network-plugin-dir=/etc/cni/net.d 

  --network-plugin=cni 





kubernetes安装问题记录

标签:kubernetes问题记录

原文地址:http://tsing.blog.51cto.com/3761021/1983480

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!