zoukankan      html  css  js  c++  java
  • kubernetes入门(10)kubernetes单机安装后

     

    前言

    查看端口是否被监听了 ::netstat -tlp |grep 31002

    我是用的yum install etcd kubernetes docker vim, 这样装的是1.5.2,不是最新版本的kubernetes

    据说可以下载*Admin安装kubernetes,装的比较新,1.7以上才支持istio的!

    一、安装业务应用

    1、安装

    kubectl create -f mysql-rc.xml

    kubectl create -f mysql-svc.xml

    kubectl create -f myweb-rc.xml

    kubectl create -f myweb-svc.xml

    2、检查

    kubectl get rc

    kubectl get pods

    kubectl get services

    3、问题1:发现pod都在containercreating状态,不是running

    运行 kubectl get pods 发现一直在containercreating状态,执行 kubectl describe pod xxxx,发现基础镜像找不到

    Error syncing pod, skipping: failed to "StartContainer" for "POD" with ImagePullBackOff: "Back-off pulling image "registry.access.redhat.com/rhel7/pod-infrastructure:latest""
    百度到的解决办法有:
    1翻墙
    2修改hosts文件(这里我用的是“61.91.161.217 gcr.io”,但是可能会失效)
    3从其他源下载容器pod-infrastructure:latest”,然后打tag为“registry.access.redhat.com/rhel7/pod-infrastructure:latest”

    我的具体做法:

    修改docker配置 vi /etc/sysconfig/docker 增加  --insecure-registry gcr.io  --registry-mirror=https://olzwzeg2.mirror.aliyuncs.com , systemctl restart docker

    从hub.com 搜索下载镜像 pod-infrastructure:latest,修改tag:docker tag xxx 

    2.2、192.168.136.103:30001

    kubectl get service

    使用当前node的ip+30001构造测试地址::http://192.168.136.103:30001/demo

    报错如下:Error:com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.

    解决办法:

  • 相关阅读:
    支付宝在ios应用上的开发[转]
    检查设备摄像头、指南针、录像、陀螺仪的状态
    iOS APP AppIcon& LaunchImage
    Crashlytics功能集成
    Email-Ext Plugin install ------ Jenkins Plugins
    瑜伽第一篇
    iOS Font
    导出android真机上应用的apk文件
    生成一个ipa的包,使非开发机也能安装成功 (Xcode5.1)
    How to use Jenkins
  • 原文地址:https://www.cnblogs.com/lexiaofei/p/7810722.html
Copyright © 2011-2022 走看看