zoukankan      html  css  js  c++  java
  • OpenShift 简介 Overview 02

    因为进度原因, 先把目前在做的更新出来, 之后再补上缺失的内容.

    快速搭建一个 OCP 来做测试.

    环境: Mac OS X High Sierra

    OCP: Latest(3.6.1)

    安装过程:

    1. 安装 Docker:

      https://store.docker.com/editions/community/docker-ce-desktop-mac

      下载, 安装, DMG 格式的, 无脑装就好了, 安装完你能看到小鲸鱼图标, Docker is running

      

    2. 配置 Docker:

      Preferences > Advanced, 根据你的资源给做配置吧, CPU 2-4, 内存 4-12 GB, 磁盘你可以自己选地方也可以默认

      

      

      Daemon, insecure registries 这里在安装 OCP 的时候会提示你的, 172.30.0.0/16

      Registry Mirrors 可以填镜像地址, 毕竟 docker.io 太慢了

        

      应用了重启

    3. 安装 oc 命令:

      https://github.com/openshift/origin/blob/master/docs/cluster_up_down.md

      我用 homebrew 安装的:

    brew install openshift-cli

     

    4. 启动 OCP:

    MacBook-Pro:~ joshuapu$ oc cluster up
    Starting OpenShift using openshift/origin:v3.6.1 ...
    OpenShift server started.
    
    The server is accessible via web console at:
        https://127.0.0.1:8443
    
    You are logged in as:
        User:     developer
        Password: <any value>
    
    To login as administrator:
        oc login -u system:admin

    好了, OCP 起来了, 接下来我们就可以登录使用了

    5. 查看一下系统状态

    MacBook-Pro:~ joshuapu$ oc whoami
    developer
    MacBook-Pro:~ joshuapu$ oc login -u system:admin
    Logged into "https://127.0.0.1:8443" as "system:admin" using existing credentials.
    
    You have access to the following projects and can switch between them with 'oc project <projectname>':
    
        default
        kube-public
        kube-system
      * myproject
        openshift
        openshift-infra
    
    Using project "myproject".
    MacBook-Pro:~ joshuapu$ oc project default
    Now using project "default" on server "https://127.0.0.1:8443".
    MacBook-Pro:~ joshuapu$ oc get pods
    NAME                            READY     STATUS      RESTARTS   AGE
    docker-registry-1-ch9c0         1/1       Running     0          16m
    persistent-volume-setup-82gq9   0/1       Completed   0          16m
    router-1-hd32j                  1/1       Running     0          16m
    MacBook-Pro:~ joshuapu$ oc get svc
    NAME              CLUSTER-IP      EXTERNAL-IP   PORT(S)                   AGE
    docker-registry   172.30.1.1      <none>        5000/TCP                  16m
    kubernetes        172.30.0.1      <none>        443/TCP,53/UDP,53/TCP     16m
    router            172.30.100.76   <none>        80/TCP,443/TCP,1936/TCP   16m
  • 相关阅读:
    5.常见类和API
    4.异常
    3.面向对象
    2.控制语句和数组
    1.初始java 数据类型 运算符
    C#设计模式——桥接模式
    C#设计模式——适配器模式
    C#设计模式——原型模式
    C#设计模式——建造者模式
    C#设计模式——抽象工厂模式
  • 原文地址:https://www.cnblogs.com/joshuapu/p/7850582.html
Copyright © 2011-2022 走看看