以多合一模式部署ocp3.11之后,使用s2i创建用于注册表的应用程序。redhat.io/jboss-webserver-3/webserver31-tomcat8-openshift:1.2失败,没有创建任何服务。 此链接中描述了我使用的步骤: https://access.redhat.com/documentation/en-us/red_hat_jboss_web_server/3.1/html-single/red_hat_jboss_web_server_for_openshift/index#Create-an-OpenShift-application-using-existing-maven-binaries
我在rhel 7.6上安装了ocp3.11,在安装过程中没有发生错误。
我设置了docker外部注册表,它可以工作。
我更改了/etc/origin/master/master-config.yaml文件,将internalRegistryHostname:docker-registry.default.svc:5000更改为我的外部注册表。
在为jws31处理s2i之后,可以启动pod,但是oc get svc中没有svc。
我检查了dc,发现dc中没有定义任何端口,但是不知道为什么dc中没有端口,如果没有端口,我怀疑将不会创建svc。
dc是:
apiVersion: apps.openshift.io/v1
kind: DeploymentConfig
metadata:
annotations:
openshift.io/generated-by: OpenShiftNewApp
creationTimestamp: 2019-04-12T09:20:44Z
generation: 2
labels:
app: myjws
name: myjws
namespace: jws-tomcat
resourceVersion: "162555"
selfLink: /apis/apps.openshift.io/v1/namespaces/jws-tomcat/deploymentconfigs/myjws
uid: 3fbc2413-5d04-11e9-aef5-080027a7340f
spec:
replicas: 1
revisionHistoryLimit: 10
selector:
app: myjws
deploymentconfig: myjws
strategy:
activeDeadlineSeconds: 21600
resources: {}
rollingParams:
intervalSeconds: 1
maxSurge: 25%
maxUnavailable: 25%
timeoutSeconds: 600
updatePeriodSeconds: 1
type: Rolling
template:
metadata:
annotations:
openshift.io/generated-by: OpenShiftNewApp
creationTimestamp: null
labels:
app: myjws
deploymentconfig: myjws
spec:
containers:
- image: master311.example.com:5555/jws-tomcat/myjws@sha256:5c65d07aba3ba4e1946a92198588d2d30c5eaef9ea7fe2c209b4db4479e2d130
imagePullPolicy: Always
name: myjws
resources: {}
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
dnsPolicy: ClusterFirst
restartPolicy: Always
schedulerName: default-scheduler
securityContext: {}
terminationGracePeriodSeconds: 30
test: false
triggers:
- type: ConfigChange
- imageChangeParams:
automatic: true
containerNames:
- myjws
from:
kind: ImageStreamTag
name: myjws:latest
namespace: jws-tomcat
lastTriggeredImage: master311.example.com:5555/jws-tomcat/myjws@sha256:5c65d07aba3ba4e1946a92198588d2d30c5eaef9ea7fe2c209b4db4479e2d130
type: ImageChange
status:
availableReplicas: 1
conditions:
- lastTransitionTime: 2019-04-12T09:20:52Z
lastUpdateTime: 2019-04-12T09:20:52Z
message: Deployment config has minimum availability.
status: "True"
type: Available
- lastTransitionTime: 2019-04-12T09:20:53Z
lastUpdateTime: 2019-04-12T09:20:53Z
message: replication controller "myjws-1" successfully rolled out
reason: NewReplicationControllerAvailable
status: "True"
type: Progressing
details:
causes:
- type: ConfigChange
message: config change
latestVersion: 1
observedGeneration: 2
readyReplicas: 1
replicas: 1
unavailableReplicas: 0
updatedReplicas: 1
应该创建svc,以便可以暴露路由。