openshift 学习笔记-1
来源:互联网 发布:it人才招聘 编辑:程序博客网 时间:2024/06/07 06:41
一、网络
- pod IP:172.17.0.3 –>docker 中的容器ip
- service IP:172.30.217.14 –>服务IP 用于pod间通信,可跨node节点,此IP是虚拟IP,物理机无法访问。
- route IP:192.168.226.144 –>暴露给外网的IP,路由到service–>container
二、oc 客户端
- 查看版本
$oc versionoc v3.7.0-alpha.1+fdbd3dckubernetes v1.7.0+695f48a16ffeatures: Basic-AuthServer https://192.168.226.144:8443openshift v3.6.0-rc.0+98b3d56kubernetes v1.6.1+5115d708d7
- 登陆
$oc versionoc v3.7.0-alpha.1+fdbd3dckubernetes v1.7.0+695f48a16ffeatures: Basic-AuthServer https://192.168.226.144:8443openshift v3.6.0-rc.0+98b3d56kubernetes v1.6.1+5115d708d7
- 创建新项目
oc versionoc v3.7.0-alpha.1+fdbd3dckubernetes v1.7.0+695f48a16ffeatures: Basic-AuthServer https://192.168.226.144:8443openshift v3.6.0-rc.0+98b3d56kubernetes v1.6.1+5115d708d7#查新看一下结果:$oc get projectNAME DISPLAY NAME STATUShello-world-oc Active
- 创建应用程序,部署镜像
$oc new-app openshift/hello-openshift--> Found Docker image ecb93ca (11 hours old) from Docker Hub for "openshift/hello-openshift" * An image stream will be created as "hello-openshift:latest" that will track this image * This image will be deployed in deployment config "hello-openshift" * Ports 8080/tcp, 8888/tcp will be load balanced by service "hello-openshift" * Other containers can access this service through the hostname "hello-openshift" * WARNING: Image "openshift/hello-openshift" runs as the 'root' user which may not be permitted by your cluster administrator--> Creating resources ... imagestream "hello-openshift" created deploymentconfig "hello-openshift" created service "hello-openshift" created--> Success Run 'oc status' to view your app.#查询一下创建结果$oc get podNAME READY STATUS RESTARTS AGEhello-openshift-1-3r588 1/1 Running 0 1m#查看详细信息oc describe pod hello-openshift-1-3r588Name: hello-openshift-1-3r588Namespace: hello-world-ocNode: localhost/192.168.226.144Start Time: Thu, 12 Oct 2017 15:25:28 +0800Labels: app=hello-openshift deployment=hello-openshift-1 deploymentconfig=hello-openshiftAnnotations: kubernetes.io/created-by={"kind":"SerializedReference","apiVersion":"v1","reference":{"kind":"ReplicationController","namespace":"hello-world-oc","name":"hello-openshift-1","uid":"82a46c44-af1e-11e7-a... openshift.io/deployment-config.latest-version=1 openshift.io/deployment-config.name=hello-openshift openshift.io/deployment.name=hello-openshift-1 openshift.io/generated-by=OpenShiftNewApp openshift.io/scc=restrictedStatus: RunningIP: 172.17.0.4Created By: ReplicationController/hello-openshift-1Controlled By: ReplicationController/hello-openshift-1Containers: hello-openshift: Container ID:
三、系群管理员
默认集群管理员为 system:admin ,该用户没有密码,登陆需要依赖证书密钥。登陆方法如下:
oc命令行,直接执行:
oc login -u system:admin
阅读全文
0 0
- openshift 学习笔记-1
- openshift 学习笔记-2
- openshift 学习笔记-4 Jenkins
- openshift 学习笔记-5 template使用
- openshift 学习笔记-6 secret and quota
- openshift 学习笔记-7 度量和日志
- openshift 学习笔记-3 核心组件和概念
- OpenShift使用笔记
- Openshift Origin开发日记 1
- OpenShift,OpenShift,还是OpenShift
- openshift/origin学习记录(1)——基于二进制文件的安装(单机版)
- openshift/origin学习记录(0)——Ansible安装多节点openshift集群
- openshift/origin学习记录(3)——添加Registry
- Part 1: From App to OpenShift (Runtimes and Templates)
- OpenShift架构
- Openshift + GOLANG
- openshift使用
- Openshift Router
- 文章标题
- 欢迎使用CSDN-markdown编辑器
- 使用POI来做报表
- GKNSPredicateRule
- observeOn()与subscribeOn()的区别
- openshift 学习笔记-1
- 第3章 Linux用户管理(一点补充)
- IPv4地址正则表达式
- EventBus的详解
- Root-NFS: Server returned error -13 while mounting ......
- shell脚本-头文件名大小写纠正
- DrawerLayout的使用
- 霍夫变换
- Map