このコンテンツは選択した言語では利用できません。

Chapter 5. Resource Examples


5.1. Preparing Resources Examples

5.1.1. Project Configuration

apiVersion: v1
kind: Project
metadata:
  annotations:
    openshift.io/description: ""
    openshift.io/display-name: ""
    openshift.io/requester: admin
    openshift.io/sa.scc.mcs: s0:c8,c2
    openshift.io/sa.scc.supplemental-groups: 1000060000/10000
    openshift.io/sa.scc.uid-range: 1000060000/10000
  creationTimestamp: 2017-05-18T06:35:06Z
  name: demo-app
  resourceVersion: "2548"
  selfLink: /oapi/v1/projectsdemo-app
  uid: 21f17420-3b94-11e7-a37b-1418776f4b43
spec:
  finalizers:
  - openshift.io/origin
  - kubernetes
status:
  phase: Active

5.1.2. ServiceAccount Configuration

apiVersion: v1
imagePullSecrets:
- name: demo-service-account-dockercfg-7qfh6
kind: ServiceAccount
metadata:
  creationTimestamp: 2017-07-28T05:00:25Z
  name: demo-service-account
  namespace: demo-app
  resourceVersion: "1799954"
  selfLink: /api/v1/namespaces/{$PROJECT}/serviceaccounts/demo-service-account
  uid: aacbb53d-7351-11e7-9e2b-1418776f4b43
secrets:
- name: demo-service-account-token-x4tx5
- name: demo-service-account-dockercfg-7qfh6
- name: demo-secret

5.1.3. RoleBinding Configuration

apiVersion: v1
groupNames: null
kind: RoleBinding
metadata:
  creationTimestamp: 2017-07-28T04:24:37Z
  name: edit
  namespace: demo-app
  resourceVersion: "1795828"
  selfLink: /oapi/v1/namespaces/demo-app/rolebindings/edit
  uid: aad4c7ea-734c-11e7-9e2b-1418776f4b43
roleRef:
  name: edit
subjects:
- kind: ServiceAccount
  name: demo-service-account
  namespace: demo-app
userNames:
- system:serviceaccount:demo-app:demo-service-account

5.1.4. Secret Configuration

apiVersion: v1
kind: Secret
metadata:
  creationTimestamp: 2017-07-18T06:31:12Z
  name: demo-secret
  namespace: demo-app
  resourceVersion: "1536805"
  selfLink: /api/v1/namespaces/demo-app/secrets/demo-secret
  uid: b13d63e0-6b82-11e7-9e2b-1418776f4b43
data:
  keystore.jks: /u3+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MHVW5rbm93bjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALgOLtnUc/O03eYxZNr5N8wMeONdjaV/N7QxbtqL1feozbux3aJ1vQHn0heqj4irnJJJTnoCt6yVhpInixC7F9tm0+zWVxAXWBAL5w7zXSMeVdjTOjKC6qwbsA/jGGQXa5+RCyuMwLb8RNp0YjvNEVqUumyIdipEQiyZNLGV9C1vZcSMRIf8Ba5b+DaD2PssXKscmEf8J2noU096NyowQJJprb/rQ/TbXmM9xca+HZGSEd5qUQ8o7fMEnnUnIdv0ftyBxvrpfwRQza//KtMa/8uaMltmbbTBXQsSTJoJb4vKkZu4UxijrBOH4wNWJpWL8LpBOC3HZqDBc1UVN61nQ+cCAwEAAaMhMB8wHQYDVR0OBBYEFCFeYqiTHAeyIczCorbqzaQ/hBzoMA0GCSqGSIb3DQEBCwUAA4IBAQANvxKg+KYg2EExKa5iHq8TxSTlUnz/gSaXYL70nFL65i1eIkvksUcduQRMfTbop8wvx5hlX3N7suSjeBtDMSFJ/ZG4PPmQCdwQkshgMgsvd9yTsbeV7Wb8tc8JRSAJFhtxAHSTLJ8MxLBlwPtu+oBkmtvLQ7xhQarhKD7GPTYCI3EQwbrhCvKOGx4uH17b8ZshilUOVtE3XiRLE3zkcCc8Sy+rDm0FSkkJ6AN4xoHXKmLkqZoKiM1S5c8Nf6tRQAUmsNIbNxG5lCTnE76ZCF4wj+ukO3t8d5x42D+vKVNEnufJ4hcY4IMXet4kAPRE/CrEDNPqA3/4MVcvHT7pmgNITpqKCkToVp57Jl+CRyJVxmdscaA=
type: Opaque

5.1.5. PersistentVolume Configuration

apiVersion: v1
kind: PersistentVolume
metadata:
  annotations:
    pv.kubernetes.io/bound-by-controller: "yes"
  creationTimestamp: 2017-08-07T05:30:05Z
  name: volume01
  resourceVersion: "2105343"
  selfLink: /api/v1/persistentvolumesvolume01
  uid: 7831e1bc-7b31-11e7-9e2b-1418776f4b43
spec:
  accessModes:
  - ReadWriteMany
  capacity:
    storage: 3Gi
  claimRef:
    apiVersion: v1
    kind: PersistentVolumeClaim
    name: volume01-volume-claim
    namespace: demo-app
    resourceVersion: "2105341"
    uid: 1ca84c8a-7b37-11e7-9e2b-1418776f4b43
  nfs:
    path: /root/storage
    server: openshift-1.example.com
  persistentVolumeReclaimPolicy: Retain
status:
  phase: Bound

5.1.6. PersistentVolumeClaim Configuration

apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  annotations:
    pv.kubernetes.io/bind-completed: "yes"
    pv.kubernetes.io/bound-by-controller: "yes"
  creationTimestamp: 2017-08-08T05:20:53Z
  name: volume05-claim
  namespace: demo-app
  resourceVersion: "2136937"
  selfLink: /api/v1/namespaces/demo-app/persistentvolumeclaims/volume05-claim
  uid: 599e61db-7bf9-11e7-9e2b-1418776f4b43
spec:
  accessModes:
  - ReadWriteMany
  resources:
    requests:
      storage: 3Gi
  volumeName: volume05
status:
  accessModes:
  - ReadWriteMany
  capacity:
    storage: 3Gi
  phase: Bound

5.1.7. DeploymentConfig Configuration

apiVersion: v1
kind: DeploymentConfig
metadata:
  annotations:
    openshift.io/generated-by: OpenShiftWebConsole
  creationTimestamp: 2017-04-20T02:24:46Z
  generation: 43
  labels:
    app: demo-app
  name: demo-app
  namespace: demo-project
  resourceVersion: "913151"
  selfLink: /oapi/v1/namespaces/demo-project/deploymentconfigs/demo-app
  uid: 858f0351-2570-11e7-8669-1418776f4b43
spec:
  replicas: 3
  selector:
    deploymentconfig: demo-app
  strategy:
    resources: {}
    rollingParams:
      intervalSeconds: 1
      maxSurge: 25%
      maxUnavailable: 25%
      timeoutSeconds: 600
      updatePeriodSeconds: 1
    type: Rolling
  template:
    metadata:
      creationTimestamp: null
      labels:
        app: demo-app
        deploymentconfig: demo-app
    spec:
      containers:
      - image: 172.30.192.109:5000/demo-project/demo-app@sha256:9e7db6c87501bf88b652cf99c9573f4909cad6ce7e91bc54297f88d39d9a9a77
        name: demo-app
        ports:
        - containerPort: 8080
          protocol: TCP
        - containerPort: 8443
          protocol: TCP
        - containerPort: 8778
          protocol: TCP
        resources: {}
        terminationMessagePath: /dev/termination-log
      dnsPolicy: ClusterFirst
      restartPolicy: Always
      securityContext: {}
      terminationGracePeriodSeconds: 30
  test: false
  triggers:
  - type: ConfigChange
  - imageChangeParams:
      containerNames:
      - demo-app
      from:
        kind: ImageStreamTag
        name: demo-app:latest
        namespace: demo-project
      lastTriggeredImage: 172.30.192.109:5000/demo-project/demo-app@sha256:ec2c64a5ca48a0c0ccb2c58556dbbf3e3f44ef7d2b2514dace06860cf3e53bec
    type: ImageChange
status:
  availableReplicas: 3
  conditions:
  - lastTransitionTime: 2017-04-28T02:21:54Z
    message: Replication controller "demo-app-36" has completed progressing
    reason: NewReplicationControllerAvailable
    status: "True"
    type: Progressing
  - lastTransitionTime: 2017-05-02T06:24:50Z
    message: Deployment config has minimum availability.
    status: "True"
    type: Available
  details:
    causes:
    - type: ConfigChange
    message: config change
  latestVersion: 36
  observedGeneration: 43
  replicas: 3
  updatedReplicas: 3

5.2. Build and Image Examples

5.2.1. Build Configuration

apiVersion: v1
kind: Build
metadata:
  annotations:
    openshift.io/build-config.name: control-app
    openshift.io/build.number: "1"
    openshift.io/build.pod-name: control-app-1-build
  creationTimestamp: 2017-05-18T08:22:36Z
  labels:
    app: control-app
    buildconfig: control-app
    openshift.io/build-config.name: control-app
    openshift.io/build.start-policy: Serial
  name: control-app-1
  namespace: demo-app
  resourceVersion: "5117"
  selfLink: /oapi/v1/namespaces/demo-app/builds/control-app-1
  uid: 25f29fe0-3ba3-11e7-a37b-1418776f4b43
spec:
  nodeSelector: null
  output:
    pushSecret:
      name: builder-dockercfg-f6301
    to:
      kind: ImageStreamTag
      name: control-app:latest
  postCommit: {}
  resources: {}
  revision:
    git:
      author:
        email: author@example.com
        name: Author Person
      commit: d9281fa6c7ca7a498bdf95049c64bbbe41b989cf
      committer:
        email: author@example.com
        name: Author Person
      message: Update POM versions for EAP 7.0.0.GA release
    type: Git
  serviceAccount: builder
  source:
    contextDir: kitchensink
    git:
      ref: 7.0.0.GA
      uri: https://github.com/jboss-developer/jboss-eap-quickstarts.git
    type: Git
  strategy:
    sourceStrategy:
      from:
        kind: DockerImage
        name: registry.access.redhat.com/jboss-eap-7/eap70-openshift@sha256:2aa466daf9d45c93ba6ea6ec4d7cd8f26a14b9850e03f3353c85bac03fdf6df9
    type: Source
  triggeredBy:
  - message: Build configuration change
status:
  completionTimestamp: 2017-05-18T08:26:17Z
  config:
    kind: BuildConfig
    name: control-app
    namespace: demo-app
  duration: 214000000000
  output:
    to:
      imageDigest: sha256:e2a66141c9c77c5507ed8237efd97d6c440b8ee0a50f5899c44d8f475be3d94c
  phase: Complete
  startTimestamp: 2017-05-18T08:22:43Z

5.2.2. BuildConfig Configuration

apiVersion: v1
kind: BuildConfig
metadata:
  annotations:
    openshift.io/generated-by: OpenShiftWebConsole
  creationTimestamp: 2017-05-18T08:22:36Z
  labels:
    app: control-app
  name: control-app
  namespace: demo-app
  resourceVersion: "4972"
  selfLink: /oapi/v1/namespaces/demo-app/buildconfigs/control-app
  uid: 25ee117e-3ba3-11e7-a37b-1418776f4b43
spec:
  nodeSelector: null
  output:
    to:
      kind: ImageStreamTag
      name: control-app:latest
  postCommit: {}
  resources: {}
  runPolicy: Serial
  source:
    contextDir: kitchensink
    git:
      ref: 7.0.0.GA
      uri: https://github.com/jboss-developer/jboss-eap-quickstarts.git
    type: Git
  strategy:
    sourceStrategy:
      from:
        kind: ImageStreamTag
        name: jboss-eap70-openshift:1.4
        namespace: openshift
    type: Source
  triggers:
  - generic:
      secret: dbc5f4f2ab54b2cc
    type: Generic
  - github:
      secret: eea95016a468c783
    type: GitHub
  - imageChange:
      lastTriggeredImageID: registry.access.redhat.com/jboss-eap-7/eap70-openshift@sha256:2aa466daf9d45c93ba6ea6ec4d7cd8f26a14b9850e03f3353c85bac03fdf6df9
    type: ImageChange
  - type: ConfigChange
status:
  lastVersion: 1

5.2.3. Image Configuration

apiVersion: v1
dockerImageLayers:
- mediaType: application/vnd.docker.container.image.rootfs.diff+x-gtar
  name: sha256:8642dd241e54ecb57f49345f135e9bcedb0546e7e61c1ca4d0008a9925f50444
  size: 0
- mediaType: application/vnd.docker.container.image.rootfs.diff+x-gtar
  name: sha256:fdd633d880f736958e14a036256b2def325acf6b438b7c849139fe92d5cbe4ce
  size: 0
- mediaType: application/vnd.docker.container.image.rootfs.diff+x-gtar
  name: sha256:9ba7fddb59304bf6233e7b8e699208cc908f236e261bb9da9a0c9f63c06cb80d
  size: 227928358
dockerImageManifestMediaType: application/vnd.docker.distribution.manifest.v1+json
dockerImageMetadata:
  Architecture: amd64
  Author: Author Person <author@example.com>
  Config:
    Cmd:
    - /usr/libexec/s2i/run
    Env:
    - PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
    - container=oci
    - JENKINS_VERSION=1.651.2
    - HOME=/var/lib/jenkins
    - JENKINS_HOME=/var/lib/jenkins
    - STI_SCRIPTS_URL=image:///usr/libexec/s2i
    ExposedPorts:
      8080/tcp: {}
      50000/tcp: {}
    Hostname: 06c09501cb72
    Image: b9ff160d3f23457a8ab1db52f7df0d7dd3d5ffa3ac51e3fd2f0021a7e83417b5
    Labels:
      architecture: x86_64
      authoritative-source-url: registry.access.redhat.com
      build-date: 2017-04-22T13:35:47.460129
      com.redhat.build-host: ip-10-29-120-106.ec2.internal
      com.redhat.component: openshift-jenkins-docker
      description: The Red Hat Enterprise Linux Base image is designed to be a fully
        supported foundation for your containerized applications.  This base image
        provides your operations and application teams with the packages, language
        runtimes and tools necessary to run, maintain, and troubleshoot all of your
        applications. This image is maintained by Red Hat and updated regularly. It
        is designed and engineered to be the base layer for all of your containerized
        applications, middleware and utilites. When used as the source for all of
        your containers, only one copy will ever be downloaded and cached in your
        production environment. Use this image just like you would a regular Red Hat
        Enterprise Linux distribution. Tools like yum, gzip, and bash are provided
        by default. For further information on how this image was built look at the
        /root/anacanda-ks.cfg file.
      distribution-scope: public
      io.k8s.description: Jenkins is a continuous integration server
      io.k8s.display-name: Jenkins 1.651.2
      io.openshift.expose-services: 8080:http
      io.openshift.s2i.scripts-url: image:///usr/libexec/s2i
      io.openshift.tags: jenkins,jenkins1,ci
      name: openshift3/jenkins-1-rhel7
      release: "57"
      summary: Provides the latest release of Red Hat Enterprise Linux 7 in a fully
        featured and supported base image.
      vcs-ref: 7f2c3c18da5c321d16e403f7905d86fb3fa89fcd
      vcs-type: git
      vendor: Red Hat, Inc.
      version: 1.651.2
    User: "1001"
    Volumes:
      /var/lib/jenkins: {}
  ContainerConfig:
    Cmd:
    - /bin/sh
    - -c
    - '#(nop) '
    - USER [1001]
    Env:
    - PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
    - container=oci
    - JENKINS_VERSION=1.651.2
    - HOME=/var/lib/jenkins
    - JENKINS_HOME=/var/lib/jenkins
    - STI_SCRIPTS_URL=image:///usr/libexec/s2i
    ExposedPorts:
      8080/tcp: {}
      50000/tcp: {}
    Hostname: 06c09501cb72
    Image: sha256:1a6180458fa11cf049d4bb9bef78f5379e9983fc023548b1fee76e790f27acfa
    Labels:
      architecture: x86_64
      authoritative-source-url: registry.access.redhat.com
      build-date: 2017-04-22T13:35:47.460129
      com.redhat.build-host: ip-10-29-120-106.ec2.internal
      com.redhat.component: openshift-jenkins-docker
      description: The Red Hat Enterprise Linux Base image is designed to be a fully
        supported foundation for your containerized applications.  This base image
        provides your operations and application teams with the packages, language
        runtimes and tools necessary to run, maintain, and troubleshoot all of your
        applications. This image is maintained by Red Hat and updated regularly. It
        is designed and engineered to be the base layer for all of your containerized
        applications, middleware and utilites. When used as the source for all of
        your containers, only one copy will ever be downloaded and cached in your
        production environment. Use this image just like you would a regular Red Hat
        Enterprise Linux distribution. Tools like yum, gzip, and bash are provided
        by default. For further information on how this image was built look at the
        /root/anacanda-ks.cfg file.
      distribution-scope: public
      io.k8s.description: Jenkins is a continuous integration server
      io.k8s.display-name: Jenkins 1.651.2
      io.openshift.expose-services: 8080:http
      io.openshift.s2i.scripts-url: image:///usr/libexec/s2i
      io.openshift.tags: jenkins,jenkins1,ci
      name: openshift3/jenkins-1-rhel7
      release: "57"
      summary: Provides the latest release of Red Hat Enterprise Linux 7 in a fully
        featured and supported base image.
      vcs-ref: 7f2c3c18da5c321d16e403f7905d86fb3fa89fcd
      vcs-type: git
      vendor: Red Hat, Inc.
      version: 1.651.2
    User: "1001"
    Volumes:
      /var/lib/jenkins: {}
  Created: 2017-04-22T13:38:24Z
  DockerVersion: 1.12.6
  Id: 3029164ce7ca6ba5ca2fce59d0fcdd0590b582e022419a59d504ed0a354d70dc
  Parent: 6baf74cede21e20f9229b4558e06d38d5cd61816abb69f6c8126f8bceaa2518f
  Size: 300045578
  apiVersion: "1.0"
  kind: DockerImage
dockerImageMetadataVersion: "1.0"
dockerImageReference: registry.access.redhat.com/openshift3/jenkins-1-rhel7@sha256:9a370e38aca93da91bda03107f74fc245b169a8c642daf431a93289f44e187a0
kind: Image
metadata:
  creationTimestamp: null
  name: sha256:9a370e38aca93da91bda03107f74fc245b169a8c642daf431a93289f44e187a0

5.2.4. Image Stream Import Configuration

kind: ImageStreamImport
apiVersion: v1
metadata:
  name: ruby
  namespace: openshift
  resourceVersion: '654'
  creationTimestamp:
spec:
  import: true
  images:
  - from:
      kind: DockerImage
      name: registry.access.redhat.com/rhscl/ruby-23-rhel7:latest
    to:
      name: '2.3'

5.2.5. Image Stream Configuration

apiVersion: v1
kind: ImageStream
metadata:
  annotations:
    openshift.io/display-name: Jenkins
    openshift.io/image.dockerRepositoryCheck: 2017-05-18T05:20:22Z
  creationTimestamp: 2017-05-18T05:18:41Z
  generation: 2
  name: jenkins
  namespace: openshift
  resourceVersion: "697"
  selfLink: /oapi/v1/namespaces/openshift/imagestreams/jenkins
  uid: 75043e39-3b89-11e7-8867-1418776f4b43
spec:
  tags:
  - annotations:
      description: Provides a Jenkins 1.X server on RHEL 7. For more information about
        using this container image, including OpenShift considerations, see https://github.com/openshift/jenkins/blob/master/README.md.
      iconClass: icon-jenkins
      openshift.io/display-name: Jenkins 1.X
      tags: hidden,jenkins
      version: 1.x
    from:
      kind: DockerImage
      name: registry.access.redhat.com/openshift3/jenkins-1-rhel7:latest
    generation: 2
    importPolicy: {}
    name: "1"
    referencePolicy:
      type: Source
  - annotations:
      description: Provides a Jenkins 2.X server on RHEL 7. For more information about
        using this container image, including OpenShift considerations, see https://github.com/openshift/jenkins/blob/master/README.md.
      iconClass: icon-jenkins
      openshift.io/display-name: Jenkins 2.X
      tags: jenkins
      version: 2.x
    from:
      kind: DockerImage
      name: registry.access.redhat.com/openshift3/jenkins-2-rhel7:latest
    generation: 2
    importPolicy: {}
    name: "2"
    referencePolicy:
      type: Source
  - annotations:
      description: |-
        Provides a Jenkins server on RHEL 7. For more information about using this container image, including OpenShift considerations, see https://github.com/openshift/jenkins/blob/master/README.md.

        WARNING: By selecting this tag, your application will automatically update to use the latest version of Jenkins available on OpenShift, including major versions updates.
      iconClass: icon-jenkins
      openshift.io/display-name: Jenkins (Latest)
      tags: jenkins
    from:
      kind: ImageStreamTag
      name: "2"
    generation: 1
    importPolicy: {}
    name: latest
    referencePolicy:
      type: Source
status:
  dockerImageRepository: 172.30.252.150:5000/openshift/jenkins
  tags:
  - items:
    - created: 2017-05-18T05:20:22Z
      dockerImageReference: registry.access.redhat.com/openshift3/jenkins-2-rhel7@sha256:105dd6e8e518b5f632e550ac8edeef52c5079c7fb102fc55db45d3b52d8053c1
      generation: 2
      image: sha256:105dd6e8e518b5f632e550ac8edeef52c5079c7fb102fc55db45d3b52d8053c1
    tag: latest
  - items:
    - created: 2017-05-18T05:20:22Z
      dockerImageReference: registry.access.redhat.com/openshift3/jenkins-1-rhel7@sha256:9a370e38aca93da91bda03107f74fc245b169a8c642daf431a93289f44e187a0
      generation: 2
      image: sha256:9a370e38aca93da91bda03107f74fc245b169a8c642daf431a93289f44e187a0
    tag: "1"
  - items:
    - created: 2017-05-18T05:20:22Z
      dockerImageReference: registry.access.redhat.com/openshift3/jenkins-2-rhel7@sha256:105dd6e8e518b5f632e550ac8edeef52c5079c7fb102fc55db45d3b52d8053c1
      generation: 2
      image: sha256:105dd6e8e518b5f632e550ac8edeef52c5079c7fb102fc55db45d3b52d8053c1
    tag: "2"

5.2.6. Image Stream Tag Configuration

apiVersion: v1
generation: 2
image:
  dockerImageLayers:
  - mediaType: application/vnd.docker.container.image.rootfs.diff+x-gtar
    name: sha256:8642dd241e54ecb57f49345f135e9bcedb0546e7e61c1ca4d0008a9925f50444
    size: 0
  - mediaType: application/vnd.docker.container.image.rootfs.diff+x-gtar
    name: sha256:fdd633d880f736958e14a036256b2def325acf6b438b7c849139fe92d5cbe4ce
    size: 0
  - mediaType: application/vnd.docker.container.image.rootfs.diff+x-gtar
    name: sha256:9ba7fddb59304bf6233e7b8e699208cc908f236e261bb9da9a0c9f63c06cb80d
    size: 227928358
  dockerImageManifestMediaType: application/vnd.docker.distribution.manifest.v1+json
  dockerImageMetadata:
    Architecture: amd64
    Author: Author Person <author@example.com>
    Config:
      Cmd:
      - /usr/libexec/s2i/run
      Env:
      - PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
      - container=oci
      - JENKINS_VERSION=1.651.2
      - HOME=/var/lib/jenkins
      - JENKINS_HOME=/var/lib/jenkins
      - STI_SCRIPTS_URL=image:///usr/libexec/s2i
      ExposedPorts:
        8080/tcp: {}
        50000/tcp: {}
      Hostname: 06c09501cb72
      Image: b9ff160d3f23457a8ab1db52f7df0d7dd3d5ffa3ac51e3fd2f0021a7e83417b5
      Labels:
        architecture: x86_64
        authoritative-source-url: registry.access.redhat.com
        build-date: 2017-04-22T13:35:47.460129
        com.redhat.build-host: ip-10-29-120-106.ec2.internal
        com.redhat.component: openshift-jenkins-docker
        description: The Red Hat Enterprise Linux Base image is designed to be a fully
          supported foundation for your containerized applications.  This base image
          provides your operations and application teams with the packages, language
          runtimes and tools necessary to run, maintain, and troubleshoot all of your
          applications. This image is maintained by Red Hat and updated regularly.
          It is designed and engineered to be the base layer for all of your containerized
          applications, middleware and utilites. When used as the source for all of
          your containers, only one copy will ever be downloaded and cached in your
          production environment. Use this image just like you would a regular Red
          Hat Enterprise Linux distribution. Tools like yum, gzip, and bash are provided
          by default. For further information on how this image was built look at
          the /root/anacanda-ks.cfg file.
        distribution-scope: public
        io.k8s.description: Jenkins is a continuous integration server
        io.k8s.display-name: Jenkins 1.651.2
        io.openshift.expose-services: 8080:http
        io.openshift.s2i.scripts-url: image:///usr/libexec/s2i
        io.openshift.tags: jenkins,jenkins1,ci
        name: openshift3/jenkins-1-rhel7
        release: "57"
        summary: Provides the latest release of Red Hat Enterprise Linux 7 in a fully
          featured and supported base image.
        vcs-ref: 7f2c3c18da5c321d16e403f7905d86fb3fa89fcd
        vcs-type: git
        vendor: Red Hat, Inc.
        version: 1.651.2
      User: "1001"
      Volumes:
        /var/lib/jenkins: {}
    ContainerConfig:
      Cmd:
      - /bin/sh
      - -c
      - '#(nop) '
      - USER [1001]
      Env:
      - PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
      - container=oci
      - JENKINS_VERSION=1.651.2
      - HOME=/var/lib/jenkins
      - JENKINS_HOME=/var/lib/jenkins
      - STI_SCRIPTS_URL=image:///usr/libexec/s2i
      ExposedPorts:
        8080/tcp: {}
        50000/tcp: {}
      Hostname: 06c09501cb72
      Image: sha256:1a6180458fa11cf049d4bb9bef78f5379e9983fc023548b1fee76e790f27acfa
      Labels:
        architecture: x86_64
        authoritative-source-url: registry.access.redhat.com
        build-date: 2017-04-22T13:35:47.460129
        com.redhat.build-host: ip-10-29-120-106.ec2.internal
        com.redhat.component: openshift-jenkins-docker
        description: The Red Hat Enterprise Linux Base image is designed to be a fully
          supported foundation for your containerized applications.  This base image
          provides your operations and application teams with the packages, language
          runtimes and tools necessary to run, maintain, and troubleshoot all of your
          applications. This image is maintained by Red Hat and updated regularly.
          It is designed and engineered to be the base layer for all of your containerized
          applications, middleware and utilites. When used as the source for all of
          your containers, only one copy will ever be downloaded and cached in your
          production environment. Use this image just like you would a regular Red
          Hat Enterprise Linux distribution. Tools like yum, gzip, and bash are provided
          by default. For further information on how this image was built look at
          the /root/anacanda-ks.cfg file.
        distribution-scope: public
        io.k8s.description: Jenkins is a continuous integration server
        io.k8s.display-name: Jenkins 1.651.2
        io.openshift.expose-services: 8080:http
        io.openshift.s2i.scripts-url: image:///usr/libexec/s2i
        io.openshift.tags: jenkins,jenkins1,ci
        name: openshift3/jenkins-1-rhel7
        release: "57"
        summary: Provides the latest release of Red Hat Enterprise Linux 7 in a fully
          featured and supported base image.
        vcs-ref: 7f2c3c18da5c321d16e403f7905d86fb3fa89fcd
        vcs-type: git
        vendor: Red Hat, Inc.
        version: 1.651.2
      User: "1001"
      Volumes:
        /var/lib/jenkins: {}
    Created: 2017-04-22T13:38:24Z
    DockerVersion: 1.12.6
    Id: 3029164ce7ca6ba5ca2fce59d0fcdd0590b582e022419a59d504ed0a354d70dc
    Parent: 6baf74cede21e20f9229b4558e06d38d5cd61816abb69f6c8126f8bceaa2518f
    Size: 300045578
    apiVersion: "1.0"
    kind: DockerImage
  dockerImageMetadataVersion: "1.0"
  dockerImageReference: registry.access.redhat.com/openshift3/jenkins-1-rhel7@sha256:9a370e38aca93da91bda03107f74fc245b169a8c642daf431a93289f44e187a0
  metadata:
    annotations:
      description: Provides a Jenkins 1.X server on RHEL 7. For more information about
        using this container image, including OpenShift considerations, see https://github.com/openshift/jenkins/blob/master/README.md.
      iconClass: icon-jenkins
      openshift.io/display-name: Jenkins 1.X
      tags: hidden,jenkins
      version: 1.x
    creationTimestamp: 2017-05-18T05:20:22Z
    name: sha256:9a370e38aca93da91bda03107f74fc245b169a8c642daf431a93289f44e187a0
    resourceVersion: "695"
    uid: b0e3ef77-3b89-11e7-8867-1418776f4b43
kind: ImageStreamTag
metadata:
  annotations:
    description: Provides a Jenkins 1.X server on RHEL 7. For more information about
      using this container image, including OpenShift considerations, see https://github.com/openshift/jenkins/blob/master/README.md.
    iconClass: icon-jenkins
    openshift.io/display-name: Jenkins 1.X
    tags: hidden,jenkins
    version: 1.x
  creationTimestamp: 2017-05-18T05:20:22Z
  name: jenkins:1
  namespace: openshift
  resourceVersion: "697"
  selfLink: /oapi/v1/namespaces/openshift/imagestreamtags/jenkins%3A1
  uid: 75043e39-3b89-11e7-8867-1418776f4b43
tag:
  annotations:
    description: Provides a Jenkins 1.X server on RHEL 7. For more information about
      using this container image, including OpenShift considerations, see https://github.com/openshift/jenkins/blob/master/README.md.
    iconClass: icon-jenkins
    openshift.io/display-name: Jenkins 1.X
    tags: hidden,jenkins
    version: 1.x
  from:
    kind: DockerImage
    name: registry.access.redhat.com/openshift3/jenkins-1-rhel7:latest
  generation: 2
  importPolicy: {}
  name: "1"
  referencePolicy:
    type: Source

5.3. Project Management Resource Examples

5.3.1. Scale Configuration

apiVersion: extensions/v1beta1
kind: Scale
metadata:
  creationTimestamp: 2017-04-20T02:24:46Z
  name: demo-app
  namespace: demo-project
  resourceVersion: "913151"
  selfLink: /oapi/v1/namespaces/demo-project/deploymentconfigs/demo-app/scale
  uid: 858f0351-2570-11e7-8669-1418776f4b43
spec:
  replicas: 3
status:
  replicas: 3
  selector:
    deploymentconfig: demo-app
  targetSelector: deploymentconfig=demo-app

5.3.2. ReplicationController Configuration

apiVersion: v1
kind: ReplicationController
metadata:
  annotations:
    kubectl.kubernetes.io/original-replicas: "1"
    openshift.io/deployer-pod.name: demo-app-8-deploy
    openshift.io/deployment-config.latest-version: "8"
    openshift.io/deployment-config.name: demo-app
    openshift.io/deployment.phase: Complete
    openshift.io/deployment.replicas: ""
    openshift.io/deployment.status-reason: image change
    openshift.io/encoded-deployment-config: |
      {"kind":"DeploymentConfig","apiVersion":"v1","metadata":{"name":"demo-app","namespace":"demo-project","selfLink":"/oapi/v1/namespaces/demo-project/deploymentconfigs/demo-app","uid":"858f0351-2570-11e7-8669-1418776f4b43","resourceVersion":"574636","generation":10,"creationTimestamp":"2017-04-20T02:24:46Z","labels":{"app":"demo-app"},"annotations":{"openshift.io/generated-by":"OpenShiftWebConsole"}},"spec":{"strategy":{"type":"Rolling","rollingParams":{"updatePeriodSeconds":1,"intervalSeconds":1,"timeoutSeconds":600,"maxUnavailable":"25%","maxSurge":"25%"},"resources":{}},"triggers":[{"type":"ConfigChange"},{"type":"ImageChange","imageChangeParams":{"automatic":true,"containerNames":["demo-app"],"from":{"kind":"ImageStreamTag","namespace":"demo-project","name":"demo-app:latest"},"lastTriggeredImage":"172.30.192.109:5000/demo-project/demo-app@sha256:9e7db6c87501bf88b652cf99c9573f4909cad6ce7e91bc54297f88d39d9a9a77"}}],"replicas":1,"test":false,"selector":{"deploymentconfig":"demo-app"},"template":{"metadata":{"creationTimestamp":null,"labels":{"app":"demo-app","deploymentconfig":"demo-app"}},"spec":{"containers":[{"name":"demo-app","image":"172.30.192.109:5000/demo-project/demo-app@sha256:9e7db6c87501bf88b652cf99c9573f4909cad6ce7e91bc54297f88d39d9a9a77","ports":[{"containerPort":8080,"protocol":"TCP"},{"containerPort":8443,"protocol":"TCP"},{"containerPort":8778,"protocol":"TCP"}],"resources":{},"terminationMessagePath":"/dev/termination-log","imagePullPolicy":"Always"}],"restartPolicy":"Always","terminationGracePeriodSeconds":30,"dnsPolicy":"ClusterFirst","securityContext":{}}}},"status":{"latestVersion":8,"observedGeneration":9,"replicas":1,"updatedReplicas":1,"availableReplicas":1,"details":{"message":"image change","causes":[{"type":"ImageChange","imageTrigger":{"from":{"kind":"ImageStreamTag","namespace":"demo-project","name":"demo-app:latest"}}}]},"conditions":[{"type":"Available","status":"True","lastTransitionTime":"2017-04-20T02:52:12Z","message":"Deployment config has minimum availability."},{"type":"Progressing","status":"True","lastTransitionTime":"2017-04-20T06:51:26Z","reason":"NewReplicationControllerAvailable","message":"Replication controller \"demo-app-7\" has completed progressing"}]}}
  creationTimestamp: 2017-04-20T07:06:50Z
  generation: 7
  labels:
    app: demo-app
    openshift.io/deployment-config.name: demo-app
  name: demo-app-8
  namespace: demo-project
  resourceVersion: "913150"
  selfLink: /api/v1/namespaces/demo-project/replicationcontrollers/demo-app-8
  uid: ed20f473-2597-11e7-8669-1418776f4b43
spec:
  replicas: 0
  selector:
    deployment: demo-app-8
    deploymentconfig: demo-app
  template:
    metadata:
      annotations:
        openshift.io/deployment-config.latest-version: "8"
        openshift.io/deployment-config.name: demo-app
        openshift.io/deployment.name: demo-app-8
      creationTimestamp: null
      labels:
        app: demo-app
        deployment: demo-app-8
        deploymentconfig: demo-app
    spec:
      containers:
      - image: 172.30.192.109:5000/demo-project/demo-app@sha256:9e7db6c87501bf88b652cf99c9573f4909cad6ce7e91bc54297f88d39d9a9a77
        imagePullPolicy: Always
        name: demo-app
        ports:
        - containerPort: 8080
          protocol: TCP
        - containerPort: 8443
          protocol: TCP
        - containerPort: 8778
          protocol: TCP
        resources: {}
        terminationMessagePath: /dev/termination-log
      dnsPolicy: ClusterFirst
      restartPolicy: Always
      securityContext: {}
      terminationGracePeriodSeconds: 30
status:
  observedGeneration: 7
  replicas: 0

5.3.3. Job Configuration

apiVersion: batch/v1
kind: Job
metadata:
  creationTimestamp: 2017-04-25T05:18:31Z
  labels:
    controller-uid: 9f3c1695-2976-11e7-8669-1418776f4b43
    job-name: demo-job
  name: demo-job
  namespace: demo-project
  resourceVersion: "703715"
  selfLink: /apis/batch/v1/namespaces/demo-project/jobs/demo-job
  uid: 9f3c1695-2976-11e7-8669-1418776f4b43
spec:
  completions: 1
  parallelism: 3
  selector:
    matchLabels:
      controller-uid: 9f3c1695-2976-11e7-8669-1418776f4b43
  template:
    metadata:
      creationTimestamp: null
      labels:
        controller-uid: 9f3c1695-2976-11e7-8669-1418776f4b43
        job-name: demo-job
      name: demo-job
    spec:
      containers:
      - command:
        - perl
        - -Mbignum=bpi
        - -wle
        - print bpi(2000)
        image: perl
        imagePullPolicy: Always
        name: demo-job
        resources: {}
        terminationMessagePath: /dev/termination-log
      dnsPolicy: ClusterFirst
      restartPolicy: Never
      securityContext: {}
      terminationGracePeriodSeconds: 30
status:
  completionTime: 2017-04-25T05:19:26Z
  conditions:
  - lastProbeTime: 2017-04-25T05:19:26Z
    lastTransitionTime: 2017-04-25T05:19:26Z
    status: "True"
    type: Complete
  startTime: 2017-04-25T05:18:31Z
  succeeded: 1

5.3.4. Pod Configuration

apiVersion: v1
kind: Pod
metadata:
  annotations:
    kubernetes.io/created-by: |
      {"kind":"SerializedReference","apiVersion":"v1","reference":{"kind":"ReplicationController","namespace":"demo-app","name":"demo-app-1","uid":"e45f3d69-3b9a-11e7-a37b-1418776f4b43","apiVersion":"v1","resourceVersion":"25862"}}
    openshift.io/deployment-config.latest-version: "1"
    openshift.io/deployment-config.name: demo-app
    openshift.io/deployment.name: demo-app-1
    openshift.io/scc: restricted
  creationTimestamp: 2017-05-19T01:59:43Z
  generateName: demo-app-1-
  labels:
    app: demo-app
    deployment: demo-app-1
    deploymentconfig: demo-app
  name: demo-app-1-6vh7q
  namespace: demo-app
  resourceVersion: "25887"
  selfLink: /api/v1/namespaces/demo-app/pods/demo-app-1-6vh7q
  uid: d3630fd0-3c36-11e7-a37b-1418776f4b43
spec:
  containers:
  - image: 172.30.252.150:5000/demo-app/demo-app@sha256:f8788dfceee980b67b041a4a7eca955f48790b294892670969d45de81470d362
    imagePullPolicy: Always
    name: demo-app
    ports:
    - containerPort: 8080
      protocol: TCP
    - containerPort: 8443
      protocol: TCP
    - containerPort: 8778
      protocol: TCP
    resources: {}
    securityContext:
      capabilities:
        drop:
        - KILL
        - MKNOD
        - SETGID
        - SETUID
        - SYS_CHROOT
      privileged: false
      runAsUser: 1000060000
      seLinuxOptions:
        level: s0:c8,c2
    terminationMessagePath: /dev/termination-log
    volumeMounts:
    - mountPath: /var/run/secrets/kubernetes.io/serviceaccount
      name: default-token-30zcw
      readOnly: true
  dnsPolicy: ClusterFirst
  imagePullSecrets:
  - name: default-dockercfg-wlhh3
  nodeName: openshift-2.example.com
  restartPolicy: Always
  securityContext:
    fsGroup: 1000060000
    seLinuxOptions:
      level: s0:c8,c2
  serviceAccount: default
  serviceAccountName: default
  terminationGracePeriodSeconds: 30
  volumes:
  - name: default-token-30zcw
    secret:
      defaultMode: 420
      secretName: default-token-30zcw
status:
  conditions:
  - lastProbeTime: null
    lastTransitionTime: 2017-05-19T01:59:43Z
    status: "True"
    type: Initialized
  - lastProbeTime: null
    lastTransitionTime: 2017-05-19T01:59:47Z
    status: "True"
    type: Ready
  - lastProbeTime: null
    lastTransitionTime: 2017-05-19T01:59:43Z
    status: "True"
    type: PodScheduled
  containerStatuses:
  - containerID: docker://0dcfd5d9d4fe864381bfb0a2c4d6441cdcded4a88708be473f2b8a1c7ebb4e17
    image: 172.30.252.150:5000/demo-app/demo-app@sha256:f8788dfceee980b67b041a4a7eca955f48790b294892670969d45de81470d362
    imageID: docker-pullable://172.30.252.150:5000/demo-app/demo-app@sha256:f8788dfceee980b67b041a4a7eca955f48790b294892670969d45de81470d362
    lastState: {}
    name: demo-app
    ready: true
    restartCount: 0
    state:
      running:
        startedAt: 2017-05-19T01:59:46Z
  hostIP: 192.0.2.2
  phase: Running
  podIP: 192.128.0.21
  startTime: 2017-05-19T01:59:43Z

5.3.5. Route Configuration

apiVersion: v1
kind: Route
metadata:
  annotations:
    openshift.io/generated-by: OpenShiftWebConsole
    openshift.io/host.generated: "true"
  creationTimestamp: 2017-05-18T07:09:39Z
  labels:
    app: demo-app
  name: demo-app
  namespace: demo-app
  resourceVersion: "351291"
  selfLink: /oapi/v1/namespaces/demo-app/routes/demo-app
  uid: f589cd2f-3b98-11e7-a37b-1418776f4b43
spec:
  host: demo-app-demo-app.router.default.svc.cluster.local
  port:
    targetPort: 8080-tcp
  to:
    kind: Service
    name: demo-app
    weight: 90
  wildcardPolicy: None
status:
  ingress:
  - conditions:
    - lastTransitionTime: 2017-05-18T07:09:39Z
      status: "True"
      type: Admitted
    host: demo-app-demo-app.router.default.svc.cluster.local
    routerName: router
    wildcardPolicy: None
Red Hat logoGithubRedditYoutubeTwitter

詳細情報

試用、購入および販売

コミュニティー

Red Hat ドキュメントについて

Red Hat をお使いのお客様が、信頼できるコンテンツが含まれている製品やサービスを活用することで、イノベーションを行い、目標を達成できるようにします。

多様性を受け入れるオープンソースの強化

Red Hat では、コード、ドキュメント、Web プロパティーにおける配慮に欠ける用語の置き換えに取り組んでいます。このような変更は、段階的に実施される予定です。詳細情報: Red Hat ブログ.

会社概要

Red Hat は、企業がコアとなるデータセンターからネットワークエッジに至るまで、各種プラットフォームや環境全体で作業を簡素化できるように、強化されたソリューションを提供しています。

© 2024 Red Hat, Inc.