官方 kubernetes 部署 openshift web管理界面

apiVersion: v1
kind: Namespace
metadata:
  name: openshift-console
  
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
  name: webconsole-new
  namespace: openshift-console
  labels:
    app: openshift-web-console-new
    webconsole: "true"
spec:
  selector:
    matchLabels:
      app: openshift-web-console-new
      webconsole: "true"
  strategy:
    type: Recreate
  template:
    metadata:
      labels:
        app: openshift-web-console-new
        webconsole: "true"
      name: webconsole-new
    spec:
      containers:
      - command:
        - /opt/bridge/bin/bridge
        - --public-dir=/opt/bridge/static
        image: openshift/origin-console:latest
        livenessProbe:
          exec:
            command:
            - /bin/sh
            - -i
            - -c
            - |-
              if [[ ! -f /tmp/webconsole-config.hash ]]; then \
                md5sum /var/webconsole-config/webconsole-config.yaml > /tmp/webconsole-config.hash; \
              elif [[ $(md5sum /var/webconsole-config/webconsole-config.yaml) != $(cat /tmp/webconsole-config.hash) ]]; then \
                exit 1; \
              fi && curl -k -f http://0.0.0.0:9000
        name: webconsole
        ports:
        - containerPort: 9000
          protocol: TCP
        readinessProbe:
          httpGet:
            path: /healthz
            port: 9000
            scheme: HTTP
        resources:
          requests:
            cpu: 100m
            memory: 100Mi

---
kind: Service
apiVersion: v1
metadata:
  name: webconsole-new
  namespace: openshift-console
  labels:
    app: webconsole-new
spec:
  ports:
    - name: http
      protocol: TCP
      port: 80
      targetPort: 9000
      nodePort: 30000
  selector:
    app: openshift-web-console-new
  type: NodePort
---
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRoleBinding
metadata:
  creationTimestamp: null
  name: system:admin
  namespace: openshift-console
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: ClusterRole
  name: admin
subjects:
- kind: ServiceAccount
  name: default
  namespace: openshift-console
  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值