OKD 3.1单节点的一种搭建方式

12 篇文章 0 订阅
2 篇文章 0 订阅

Starting an All-in-One Server

安装docker 1.13

参见我的docker blog
https://blog.csdn.net/zhixingheyi_tian/article/details/89374623
配置好代理

docker 上增加 insecure-registry

vi /etc/docker/daemon.json

{ "insecure-registries": ["172.30.0.0/16"] }
重启docker
systemctl daemon-reload
systemctl restart docker
设置OKD 相关环境
vim /etc/environment 
no_proxy=.internal.example.com,10.0.0.1,10.0.0.2,10.0.0.3,.cluster.local,.svc,localhost,127.0.0.1,172.30.0.1,172.30.1.1,10.0.2.40,10.1.2.40

vim  /etc/bashrc
export NO_PROXY=10.0.2.40,10.1.2.40,localhost,127.0.0.1,172.30.1.1,10.0.2.131,10.0.2.135,10.96.0.0/12,10.0.0.0/12,192.168.99.0/24,192.168.39.0/24,*.{}.com,10.239.47.*,*.sh.{}.com
启动OKD
oc cluster up --http-proxy='http://xxx:666' --https-proxy='http://xxx:666' --no-proxy=[.internal.example.com,10.0.0.1,10.0.0.2,10.0.0.3,.cluster.local,.svc,localhost,127.0.0.1,172.30.0.1,172.30.1.1,10.0.2.40,10.1.2.40]
检查
# kubectl cluster-info
Kubernetes master is running at https://127.0.0.1:8443

To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'.
Error from server (Forbidden): services is forbidden: User "developer" cannot list services in the namespace "kube-system": no RBAC policy matched
# 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-dns
    kube-proxy
    kube-public
    kube-system
  * myproject
    openshift
    openshift-apiserver
    openshift-controller-manager
    openshift-core-operators
    openshift-infra
    openshift-node
    openshift-service-cert-signer
    openshift-web-console

Using project "myproject".

# kubectl cluster-info
Kubernetes master is running at https://127.0.0.1:8443

To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'.
常用命令
#  oc version
oc v3.11.0+0cbc58b
kubernetes v1.11.0+d4cacc0
features: Basic-Auth GSSAPI Kerberos SPNEGO

Server https://127.0.0.1:8443
kubernetes v1.11.0+d4cacc0

#oc config view
apiVersion: v1
clusters:
- cluster:
    certificate-authority-data: REDACTED
    server: https://127.0.0.1:8443
  name: 127-0-0-1:8443
contexts:
- context:
    cluster: 127-0-0-1:8443
    user: developer/127-0-0-1:8443
  name: /127-0-0-1:8443/developer
- context:
    cluster: 127-0-0-1:8443
    user: xshen/127-0-0-1:8443
  name: /127-0-0-1:8443/xshen
- context:
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值