openshift

该死的anyuid

谁都会走 提交于 2021-02-18 21:30:58
相信接触过paas的用户都遇到过 部署镜像报错没有权限问题。就是在paas环境中不建议使用root用户,但是如果一定要使用root则可以修改权限设置anyuid 来解决。 #给容器所在的项目赋权 [root@openshift-master tmp]# oc adm policy add-scc-to-user anyuid system:serviceaccount:openshift-infra:default [root@openshift-master tmp]# oc adm policy add-scc-to-user privileged system:serviceaccount:openshift-infra:default #备用,去权命令 [root@openshift-master tmp]# oc adm policy remove-scc-from-user anyuid system:serviceaccount:openshift-infra:default [root@openshift-master tmp]# oc adm policy remove-scc-from-user privileged system:serviceaccount:openshift-infra:default 来源: oschina 链接: https://my

How to filter the running nodes

拜拜、爱过 提交于 2021-02-17 07:08:12
问题 I want to filter the running nodes list . I tried below command but its only showing running status.I need to filter with it name..Any help ? [root@techsl]# kubectl get nodes -o jsonpath='{range .items[ ]}{@.metadata.name}:{range @.status. enter code here conditions[ ]}{@.type}={@.status};{end}{end}'| tr ';' "\n" | grep "Ready=True" 回答1: Something like this is easier: kubectl get nodes | grep -v NotReady | awk '{print $1}' | tail -n2 server1 server3 kubectl get nodes NAME STATUS ROLES AGE

How to filter the running nodes

送分小仙女□ 提交于 2021-02-17 07:07:47
问题 I want to filter the running nodes list . I tried below command but its only showing running status.I need to filter with it name..Any help ? [root@techsl]# kubectl get nodes -o jsonpath='{range .items[ ]}{@.metadata.name}:{range @.status. enter code here conditions[ ]}{@.type}={@.status};{end}{end}'| tr ';' "\n" | grep "Ready=True" 回答1: Something like this is easier: kubectl get nodes | grep -v NotReady | awk '{print $1}' | tail -n2 server1 server3 kubectl get nodes NAME STATUS ROLES AGE

容器计算资源管理&网络QoS的实现---Openshift3.9学习系列第四篇

試著忘記壹切 提交于 2021-02-14 15:30:10
前言 本文仅代表作者的个人观点; 本文的内容仅限于技术探讨,不能直接作为指导生产环境的素材; 本文素材是红帽公司产品技术和手册; 本文分为系列文章,将会有多篇,初步预计将会有8篇。 本文最后一节网络QoS部分,引用了潘晓华的文章。 一、计算资源 在OCP中,每个计算节点(默认是node节点,master节点通过配置也可以运行业务,但不建议这么做。)对于pod而言,CPU和内存都是属于计算资源。 在创建pod的时候,可以指定容器需要多少CPU和内存(RAM)。其中: CPU是以millicores的单位进行分配,即一个CPU core 1/1000的运算能力。 内存分配以字节为单位,也可以设置成 以Gi, Mi, Ki为单位。 例如下图,设置pod需要获取的CPU是100m,内存是200MiB。100m相当于1/10 CPU Core的计算能力。 二、几个参数 CPU Request pod中的每个容器都可以指定它在节点上请求的CPU量;同时Scheduler使用CPU请求来查找适合容器的节点 CPU Request表示容器可能消耗的最小CPU量 1. 如果节点上没有CPU争用,它可以使用所有可用的CPU 2.如果节点上存在CPU争用,则CPU Request会在系统上的所有容器中提供相对权重,以确定容器可以使用多少CPU时间 CPU Limits

Jsp page on Spring mvc renders to whitescreen on page refresh

走远了吗. 提交于 2021-02-11 17:19:26
问题 Inside our application, we are randomly getting below issue while submitting requests. (occuring in different pages). On request submission,page suddenly goes blank. We have multiple dropdowns in Jsp page. On selecting some of the drop-down , form submission happens to populate other dropdowns. We found that new modelandview is returned from controller, but page goes blank. When we refresh the url, application is available again. Weird thing is , it doesn't not occur always even for same

how to autoscale the spring batch application in openshift?

喜欢而已 提交于 2021-02-11 15:42:14
问题 I have a spring batch application which will trigger the job to transfer bulk data from one database to another database through API call.All jobs are configured to work in parallel processing(Master/slave step)partition and deployed this application in openshift. Need to autoscale the application based on the load during the job execution.Even though i have used the openshift autoscale feature still i couldn't find the efficiency in performance of the job. PODs are simply creating but only

Why am I getting this “unauthorized” error when trying to mirror OKD installation images from Quay.io?

岁酱吖の 提交于 2021-02-11 12:41:12
问题 I have been working on an installation of OKD on an air-gapped environment. The first major step has been mirroring the OKD images so that they can be moved over to the new environment and pulled locally. I've been following a combination of the OpenShift documentation and this article, as well as this resource for getting my certificates set up. I have been making slow but consistent progress. However, I am now having trouble when attempting to actually mirror the files using oc adm -a $

Tomcat - How to persist a session immediately to disk using PersistentManager + FileStore

折月煮酒 提交于 2021-02-07 09:15:50
问题 I want to persist Tomcat's HttpSessions to disk so that it can be used in a scalable cloud environment. The point is that there will be a number of Tomcat nodes up (in a cloud PaaS) and clients can be directed to any of them. We want to persist and load the sessions from a shared disk unit. I have configured the PersistentManager this way: context.xml <Manager className="org.apache.catalina.session.PersistentManager"> <Store className="org.apache.catalina.session.FileStore" directory="c:

Tomcat - How to persist a session immediately to disk using PersistentManager + FileStore

时间秒杀一切 提交于 2021-02-07 09:13:54
问题 I want to persist Tomcat's HttpSessions to disk so that it can be used in a scalable cloud environment. The point is that there will be a number of Tomcat nodes up (in a cloud PaaS) and clients can be directed to any of them. We want to persist and load the sessions from a shared disk unit. I have configured the PersistentManager this way: context.xml <Manager className="org.apache.catalina.session.PersistentManager"> <Store className="org.apache.catalina.session.FileStore" directory="c:

How do you create a VM in Openshift from a qemu-kvm img file and a custom kernel?

家住魔仙堡 提交于 2021-01-29 19:12:45
问题 We are currently using a qemu kvm, on physical systems, for our testing and would like to move this into our OpenShift cluster. We are running something like this (other parameters removed for clarity) qemu-system-x86_64 -kernel bzImage -drive file=container.ext4.img,format=raw When looking at the OpenShift Create VM Wizard I can set source=URL and point to the .img file but see know where to specify the kernel file we use. When we run just the image file the console says Booting from Hard