### Quick Start Introduction Example Source: https://docs.okd.io/latest/web_console/creating-quick-start-tutorials An example of a correct introduction for a quick start, clearly stating the outcome and guiding the user. ```markdown In this quick start, you will deploy a sample application to {product-title}. ``` -------------------------------- ### Get ConsoleQuickStart YAML Example Source: https://docs.okd.io/latest/web_console/creating-quick-start-tutorials Retrieves a YAML configuration file for a ConsoleQuickStart resource, which can then be modified to create a new quick start tutorial. ```bash oc get -o yaml consolequickstart spring-with-s2i > my-quick-start.yaml ``` -------------------------------- ### Quick Start Tasks Example Source: https://docs.okd.io/latest/web_console/creating-quick-start-tutorials An example of how to list tasks within a quick start introduction, starting each task with a verb. ```markdown Tasks to complete: Create a serverless application; Connect an event source; Force a new revision ``` -------------------------------- ### Quick Start Card Description Example Source: https://docs.okd.io/latest/web_console/creating-quick-start-tutorials An example of a concise and action-oriented description for a quick start card, focusing on the user's goal. ```markdown Create a serverless application. ``` -------------------------------- ### Verify oc CLI installation Source: https://docs.okd.io/latest/cli_reference/openshift_cli/getting-started-cli Confirms that the OpenShift CLI (oc) is installed and accessible by executing a basic command. This verifies the installation and that the oc binary is in the system's PATH. ```shell oc ``` -------------------------------- ### install-config.yaml Example for OCI Source: https://docs.okd.io/latest/installing/installing_oci/installing-oci-agent-based-installer An example of the install-config.yaml file configured for an external OCI platform. This file specifies cluster network settings, machine configurations, and OCI-specific platform details. ```yaml # install-config.yaml apiVersion: v1 baseDomain: __**(1)** networking: clusterNetwork: - cidr: 10.128.0.0/14 hostPrefix: 23 network type: OVNKubernetes machineNetwork: - cidr: __**(2)** serviceNetwork: - 172.30.0.0/16 compute: - architecture: amd64 __**(3)** hyperthreading: Enabled name: worker replicas: 0 controlPlane: architecture: amd64 __**(3)** hyperthreading: Enabled name: master replicas: 3 platform: external: platformName: oci __**(4)** cloudControllerManager: External sshKey: __**(5)** pullSecret: '' __**(6)** ``` -------------------------------- ### Verify oc CLI installation on Windows Source: https://docs.okd.io/latest/cli_reference/openshift_cli/getting-started-cli Confirms that the OpenShift CLI (oc) is installed and accessible on Windows by executing a basic command. This verifies the installation and that the oc binary is in the system's PATH. ```batch C:\> oc ``` -------------------------------- ### Log in to OpenShift CLI Source: https://docs.okd.io/latest/cli_reference/openshift_cli/getting-started-cli This shows the process of logging into an OpenShift cluster using the `oc login` command. It includes an example of providing the server URL, handling insecure connections, and entering username and password credentials. ```shell $ oc login -u user1 ``` ```shell Server [https://localhost:8443]: https://openshift.example.com:6443 The server uses a certificate signed by an unknown authority. You can bypass the certificate check, but any data you send to the server could be intercepted by others. Use insecure connections? (y/n): y Authentication required for https://openshift.example.com:6443 (openshift) Username: user1 Password: Login successful. ``` ```shell oc new-project ``` -------------------------------- ### Example journalctl Output Source: https://docs.okd.io/latest/edge_computing/image_base_install/ibi-factory-image-based-install This is an example of the output from the `journalctl -b` command, showing successful precaching of images and completion of the SNO Image-based Installation. ```log Aug 13 17:01:44 10.46.26.129 install-rhcos-and-restore-seed.sh[2876]: time="2024-08-13T17:01:44Z" level=info msg="All the precaching threads have finished." Aug 13 17:01:44 10.46.26.129 install-rhcos-and-restore-seed.sh[2876]: time="2024-08-13T17:01:44Z" level=info msg="Total Images: 125" Aug 13 17:01:44 10.46.26.129 install-rhcos-and-restore-seed.sh[2876]: time="2024-08-13T17:01:44Z" level=info msg="Images Pulled Successfully: 125" Aug 13 17:01:44 10.46.26.129 install-rhcos-and-restore-seed.sh[2876]: time="2024-08-13T17:01:44Z" level=info msg="Images Failed to Pull: 0" Aug 13 17:01:44 10.46.26.129 install-rhcos-and-restore-seed.sh[2876]: time="2024-08-13T17:01:44Z" level=info msg="Completed executing pre-caching" Aug 13 17:01:44 10.46.26.129 install-rhcos-and-restore-seed.sh[2876]: time="2024-08-13T17:01:44Z" level=info msg="Pre-cached images successfully." Aug 13 17:01:44 10.46.26.129 install-rhcos-and-restore-seed.sh[2876]: time="2024-08-13 17:01:44" level=info msg="Skipping shutdown" Aug 13 17:01:44 10.46.26.129 install-rhcos-and-restore-seed.sh[2876]: time="2024-08-13 17:01:44" level=info msg="IBI preparation process finished successfully!" Aug 13 17:01:44 10.46.26.129 systemd[1]: var-lib-containers-storage-overlay.mount: Deactivated successfully. Aug 13 17:01:44 10.46.26.129 systemd[1]: Finished SNO Image-based Installation. Aug 13 17:01:44 10.46.26.129 systemd[1]: Reached target Multi-User System. Aug 13 17:01:44 10.46.26.129 systemd[1]: Reached target Graphical Interface. ``` -------------------------------- ### Install OpenShift CLI on macOS via Web Console Source: https://docs.okd.io/latest/cli_reference/openshift_cli/getting-started-cli This describes the manual process of downloading and setting up the OpenShift CLI (oc) binary on macOS from the OpenShift web console. It involves downloading the correct binary for your architecture, unpacking it, and placing it in a directory included in your system's PATH. ```shell $ echo $PATH ``` ```shell $ oc ``` -------------------------------- ### Example Mirroring Output Source: https://docs.okd.io/latest/disconnected/mirroring/installing-mirroring-installation-images Shows example output from the catalog mirroring process, including paths for the temporary index database and the generated mirroring manifests. ```bash src image has index label for database path: /database/index.db using database path mapping: /database/index.db:/tmp/153048078 wrote database to /tmp/153048078 __**(1)** ... wrote mirroring manifests to manifests-catalog-1614211642 __**(2)** ``` -------------------------------- ### Example install-config.yaml for Single-Node OKD Installation Source: https://docs.okd.io/latest/installing/installing_aws/preparing-to-install-on-aws Provides an example of the `install-config.yaml` file used when installing an OKD cluster on a single node. This configuration is crucial for setting up the cluster's parameters and should be adapted to specific requirements. ```yaml apiVersion: v1 baseDomain: example.com compute: - architecture: amd64 hyperthreading: Enabled name: worker platform: aws: type: m5.xlarge replicas: 0 controlPlane: architecture: amd64 hyperthreading: Enabled name: master platform: aws: type: m5.xlarge replicas: 3 metadata: creationTimestamp: null name: okd-cluster networking: clusterNetworks: - cidr: 10.128.0.0/14 hostPrefix: 24 machineNetwork: - cidr: 10.0.0.0/16 networkType: OpenShiftSDN serviceNetworks: - 172.30.0.0/16 platform: aws: region: us-east-1 type: nil zones: - us-east-1a - us-east-1b - us-east-1c - us-east-1d sshKey: | ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQD... ``` -------------------------------- ### Get General OpenShift CLI Help Source: https://docs.okd.io/latest/cli_reference/openshift_cli/getting-started-cli Provides a comprehensive list and descriptions of all available OpenShift CLI commands. This is the primary entry point for understanding the CLI's functionality. ```bash $ oc help ``` -------------------------------- ### Example Output for Log Gathering Source: https://docs.okd.io/latest/support/troubleshooting/troubleshooting-installations This is an example of the output you can expect after successfully gathering logs. The logs are typically compressed into a .tar.gz file. ```text INFO Pulling debug logs from the bootstrap machine INFO Bootstrap gather logs captured here "/log-bundle-.tar.gz" ``` -------------------------------- ### Example Installation Output Source: https://docs.okd.io/latest/installing/installing_aws/ipi/installing-aws-default Sample output from a successful OKD cluster installation, providing information on accessing the cluster via oc and the web console, along with login credentials and elapsed time. ```text ... INFO Install complete! INFO To access the cluster as the system:admin user when using 'oc', run 'export KUBECONFIG=/home/myuser/install_dir/auth/kubeconfig' INFO Access the OpenShift web-console here: https://console-openshift-console.apps.mycluster.example.com INFO Login to the console with user: "kubeadmin", and password: "password" INFO Time elapsed: 36m22s ``` -------------------------------- ### FlexVolume Driver Installation Path Example Source: https://docs.okd.io/latest/storage/persistent_storage/persistent-storage-flexvolume Illustrates the directory structure for installing a FlexVolume driver executable on OKD nodes. The example shows the path for a driver named 'foo' provided by 'openshift.com'. ```bash /etc/kubernetes/kubelet-plugins/volume/exec/openshift.com~foo/foo ``` -------------------------------- ### Proxy Configuration Example for Image-Based Installation Source: https://docs.okd.io/latest/edge_computing/image_base_install/ibi-factory-image-based-install This snippet shows how to specify proxy settings for the installation ISO generation process. It includes httpProxy, httpsProxy, and noProxy configurations. ```yaml proxy: httpProxy: "http://proxy.example.com:8080" httpsProxy: "http://proxy.example.com:8080" noProxy: "no_proxy.example.com" ``` -------------------------------- ### Example FCOS image URLs Source: https://docs.okd.io/latest/installing/installing_bare_metal/ipi/ipi-install-troubleshooting Example configuration snippet showing URLs for FCOS images hosted on an internal webserver. These are used within the install-config.yaml file. ```yaml bootstrapOSImage: http:///rhcos-43.81.202001142154.0-qemu..qcow2.gz?sha256=9d999f55ff1d44f7ed7c106508e5deecd04dc3c06095d34d36bf1cd127837e0c clusterOSImage: http:///rhcos-43.81.202001142154.0-openstack..qcow2.gz?sha256=a1bda656fa0892f7b936fdc6b6a6086bddaed5dafacedcd7a1e811abb78fe3b0 ``` -------------------------------- ### Example DNS Query Response Source: https://docs.okd.io/latest/installing/installing_bare_metal/ipi/ipi-install-troubleshooting An example of the output from a 'dig' command querying the Kubernetes API endpoint. It shows the DNS resolution status, IP address, and query details. ```dns ;; <<>> DiG 9.11.4-P2-RedHat-9.11.4-26.P2.el8 <<>> api..example.com ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 37551 ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 2 ;; OPT PSEUDOSECTION: ; EDNS: version: 0, flags:; udp: 4096 ; COOKIE: 866929d2f8e8563582af23f05ec44203d313e50948d43f60 (good) ;; QUESTION SECTION: ;api..example.com. IN A ;; ANSWER SECTION: api..example.com. 10800 IN A 10.19.13.86 ;; AUTHORITY SECTION: .example.com. 10800 IN NS .example.com. ;; ADDITIONAL SECTION: .example.com. 10800 IN A 10.19.14.247 ;; Query time: 0 msec ;; SERVER: 10.19.14.247#53(10.19.14.247) ;; WHEN: Tue May 19 20:30:59 UTC 2020 ;; MSG SIZE rcvd: 140 ``` -------------------------------- ### ImageBasedInstallationConfig Example Source: https://docs.okd.io/latest/edge_computing/image_base_install/ibi-factory-image-based-install A sample `ImageBasedInstallationConfig` YAML file demonstrating the structure and required fields for an image-based installation. It includes placeholders for the seed image URL, version, installation disk, pull secret, and optional network configuration. ```yaml # # Note: This is a sample ImageBasedInstallationConfig file showing # which fields are available to aid you in creating your # own image-based-installation-config.yaml file. # apiversion: v1beta1 kind: ImageBasedInstallationConfig metadata: name: example-image-based-installation-config # The following fields are required seedImage: quay.io/openshift-kni/seed-image:4.19.0 seedVersion: 4.19.0 installationDisk: /dev/vda pullSecret: '' # networkConfig is optional and contains the network configuration for the host in NMState format. # See https://nmstate.io/examples.html for examples. # networkConfig: # interfaces: # - name: eth0 # type: ethernet # state: up # mac-address: 00:00:00:00:00:00 # ipv4: # enabled: true # address: # - ip: 192.168.122.2 # prefix-length: 23 ``` -------------------------------- ### View ConsoleQuickStart API Documentation Source: https://docs.okd.io/latest/web_console/creating-quick-start-tutorials Displays the API documentation for ConsoleQuickStart resources, providing details on available fields and their usage for defining quick starts. ```bash oc explain consolequickstarts ``` -------------------------------- ### Image Digest Sources Example for Image-Based Installation Source: https://docs.okd.io/latest/edge_computing/image_base_install/ibi-factory-image-based-install This snippet illustrates how to define custom sources or repositories for release-image content, allowing for mirrors of specified sources. ```yaml imageDigestSources: - mirrors: - "registry.example.com:5000/ocp4/openshift4" source: "quay.io/openshift-release-dev/ocp-release" ``` -------------------------------- ### Create ConsoleQuickStart from YAML Source: https://docs.okd.io/latest/web_console/creating-quick-start-tutorials Applies a local YAML configuration file to create a new ConsoleQuickStart resource within the OpenShift cluster. ```bash oc create -f my-quick-start.yaml ``` -------------------------------- ### Install OpenShift CLI on macOS using Homebrew Source: https://docs.okd.io/latest/cli_reference/openshift_cli/getting-started-cli This snippet demonstrates how to install the OpenShift CLI (oc) on macOS using the Homebrew package manager. It requires Homebrew to be pre-installed. The command installs the `openshift-cli` package. ```shell $ brew install openshift-cli ``` ```shell $ oc ``` -------------------------------- ### Basic Network Configuration (YAML) Source: https://docs.okd.io/latest/installing/installing_openstack/installation-config-parameters-openstack A minimal example of the `networking` configuration object in YAML format, used for cluster network setup in OKD. This configuration is immutable after installation. ```yaml networking: ``` -------------------------------- ### UI Element Formatting Examples Source: https://docs.okd.io/latest/web_console/creating-quick-start-tutorials Demonstrates how to format various UI elements, including buttons, dropdowns, fields, page names, code, user-entered text, hints, CLI commands, parameters, and options, for consistency in documentation. ```text Copy for buttons, dropdowns, tabs, fields, and other UI controls: Write the copy as it appears in the UI and bold it. All other UI elements—including page, window, and panel names: Write the copy as it appears in the UI and bold it. Code or user-entered text: Use monospaced font. Hints: If a hint to a navigation or masthead element is included, style the text as you would a link. CLI commands: Use monospaced font. In running text, use a bold, monospaced font for a command. If a parameter or option is a variable value, use an italic monospaced font. Use a bold, monospaced font for the parameter and a monospaced font for the option. ``` -------------------------------- ### Example Output of Verified ClusterExtension Source: https://docs.okd.io/latest/extensions/ce/managing-ce This is an example of the detailed YAML output when retrieving a ClusterExtension resource using `oc get clusterextension -o yaml`. It includes metadata, spec, and status information. ```yaml apiVersion: v1 items: - apiVersion: olm.operatorframework.io/v1 kind: ClusterExtension metadata: annotations: kubectl.kubernetes.io/last-applied-configuration: | {"apiVersion":"olm.operatorframework.io/v1","kind":"ClusterExtension","metadata":{"annotations":{},"name":"pipes"},"spec":{"namespace":"pipelines","serviceAccount":{"name":"pipelines-installer"},"source":{"catalog":{"packageName":"openshift-pipelines-operator-rh","version":"1.14.x"},"sourceType":"Catalog"}}} creationTimestamp: "2025-02-18T21:48:13Z" finalizers: - olm.operatorframework.io/cleanup-unpack-cache - olm.operatorframework.io/cleanup-contentmanager-cache generation: 1 name: pipelines-operator resourceVersion: "72725" uid: e18b13fb-a96d-436f-be75-a9a0f2b07993 spec: namespace: pipelines serviceAccount: name: pipelines-installer source: catalog: packageName: openshift-pipelines-operator-rh upgradeConstraintPolicy: CatalogProvided version: 1.14.x sourceType: Catalog status: conditions: - lastTransitionTime: "2025-02-18T21:48:13Z" message: "" observedGeneration: 1 reason: Deprecated status: "False" type: Deprecated - lastTransitionTime: "2025-02-18T21:48:13Z" message: "" observedGeneration: 1 reason: Deprecated status: "False" type: PackageDeprecated - lastTransitionTime: "2025-02-18T21:48:13Z" message: "" observedGeneration: 1 reason: Deprecated status: "False" type: ChannelDeprecated ``` -------------------------------- ### Example Helm Version Output Source: https://docs.okd.io/latest/applications/working_with_helm_charts/installing-helm Sample output demonstrating the version information returned by the `helm version` command. ```text version.BuildInfo{Version:"v3.0", GitCommit:"b31719aab7963acf4887a1c1e6d5e53378e34d93", GitTreeState:"clean", GoVersion:"go1.13.4"} ``` -------------------------------- ### Correct vs. Incorrect Action Examples Source: https://docs.okd.io/latest/web_console/creating-quick-start-tutorials Illustrates the preferred style for writing user actions, emphasizing conciseness and directness. It shows the correct way to phrase commands like clicking buttons and navigating between perspectives. ```text Correct example : ``` Click OK. ``` Incorrect example : ``` Click on the OK button. ``` Enter the Developer perspective: In the main navigation, click the dropdown menu and select Developer. Enter the Administrator perspective: In the main navigation, click the dropdown menu and select Admin. ``` -------------------------------- ### Example agent-config.yaml for IPv4 Network Source: https://docs.okd.io/latest/installing/installing_oci/installing-oci-agent-based-installer This snippet shows a sample `agent-config.yaml` file configured for an IPv4 network. It includes fields for cluster name, namespace, rendezvous IP, and the base URL for boot artifacts, crucial for agent-based installations. ```yaml apiVersion: v1beta1 metadata: name: __**(1)** namespace: __**(2)** rendezvousIP: __**(3)** bootArtifactsBaseURL: __**(4)** ``` -------------------------------- ### Location-Action Structure Examples Source: https://docs.okd.io/latest/web_console/creating-quick-start-tutorials Highlights the recommended 'Location, action' structure for instructions, ensuring users know where to perform an action before being told what to do. It contrasts correct and incorrect phrasing for hover actions. ```text Correct example : ``` In the node.js deployment, hover over the icon. ``` Incorrect example : ``` Hover over the icon in the node.js deployment. ``` ``` -------------------------------- ### Get OKD Operators Status Source: https://docs.okd.io/latest/installing/installing_oci/installing-oci-agent-based-installer This command lists the status of all Operators within the OKD cluster. The status of the CCM Operator is particularly indicative of a running cluster on OCI. ```bash $ oc get co ``` -------------------------------- ### ConsoleQuickStart CR - Description Element Source: https://docs.okd.io/latest/web_console/creating-quick-start-tutorials Demonstrates the 'description' element in a ConsoleQuickStart custom resource YAML, which provides a brief overview of the quick start's goal and appears on the initial catalog tile. ```yaml apiVersion: console.openshift.io/v1 kind: ConsoleQuickStart metadata: name: spring-with-s2i spec: description: 'Import a Spring Application from git, build, and deploy it onto OpenShift.' __**(1)** ... ``` -------------------------------- ### VPA Status Recommendations Output Source: https://docs.okd.io/latest/nodes/pods/nodes-pods-vertical-autoscaler Example output from `oc get vpa` showing container-specific resource recommendations including lowerBound, target, uncappedTarget, and upperBound. ```yaml ... status: ... recommendation: containerRecommendations: - containerName: frontend lowerBound: cpu: 25m memory: 262144k target: cpu: 25m memory: 262144k uncappedTarget: cpu: 25m memory: 262144k upperBound: cpu: 262m memory: "274357142" - containerName: backend lowerBound: cpu: 12m memory: 131072k target: cpu: 12m memory: 131072k uncappedTarget: cpu: 12m memory: 131072k upperBound: cpu: 476m memory: "498558823" ... ``` -------------------------------- ### Get OKD Nodes Status Source: https://docs.okd.io/latest/installing/installing_oci/installing-oci-agent-based-installer This command retrieves the status of all nodes within the OKD cluster, including their readiness, roles, age, and version. It is useful for verifying cluster health. ```bash $ oc get nodes -A ``` -------------------------------- ### User Action vs. Additional Information Source: https://docs.okd.io/latest/web_console/creating-quick-start-tutorials Differentiates between explicit user actions and supplementary information about product functionality. This ensures clarity for the user on what steps they need to take versus what the system does. ```text User action : ``` Change the time range of the dashboard by clicking the dropdown menu and selecting time range. ``` Additional information : ``` To look at data in a specific time frame, you can change the time range of the dashboard. ``` ``` -------------------------------- ### ClusterGroupUpgrade CR example with blocking CRs (cgu-b) Source: https://docs.okd.io/latest/edge_computing/cnf-talm-for-cluster-upgrades This example defines a ClusterGroupUpgrade CR named 'cgu-b'. It is configured with `blockingCRs` that depend on 'cgu-a', specifies target `clusters`, and lists `managedPolicies`. The `status` indicates it's blocked by 'cgu-a', preventing the upgrade from starting. ```yaml apiVersion: ran.openshift.io/v1alpha1 kind: ClusterGroupUpgrade metadata: name: cgu-b namespace: default spec: blockingCRs: - name: cgu-a namespace: default clusters: - spoke4 - spoke5 enable: true managedPolicies: - policy1-common-cluster-version-policy - policy2-common-pao-sub-policy - policy3-common-ptp-sub-policy - policy4-common-sriov-sub-policy remediationStrategy: maxConcurrency: 1 timeout: 240 status: conditions: - message: 'The ClusterGroupUpgrade CR is blocked by other CRs that have not yet completed: [cgu-a]' reason: UpgradeCannotStart status: "False" type: Ready managedPoliciesForUpgrade: - name: policy1-common-cluster-version-policy namespace: default - name: policy2-common-pao-sub-policy namespace: default - name: policy3-common-ptp-sub-policy namespace: default - name: policy4-common-sriov-sub-policy namespace: default placementBindings: - cgu-b-policy1-common-cluster-version-policy - cgu-b-policy2-common-pao-sub-policy - cgu-b-policy3-common-ptp-sub-policy - cgu-b-policy4-common-sriov-sub-policy placementRules: - cgu-b-policy1-common-cluster-version-policy - cgu-b-policy2-common-pao-sub-policy - cgu-b-policy3-common-ptp-sub-policy - cgu-b-policy4-common-sriov-sub-policy remediationPlan: - - spoke4 - - spoke5 status: {} ``` -------------------------------- ### Describe a Velero Backup Resource Source: https://docs.okd.io/latest/backup_and_restore/application_backup_and_restore/troubleshooting/velero-cli-tool This example shows how to use the Velero CLI to get a detailed description of a specific backup resource, including warnings and errors encountered during the backup process. ```shell oc -n openshift-adp exec deployment/velero -c velero -- ./velero \ backup describe 0e44ae00-5dc3-11eb-9ca8-df7e5254778b-2d8ql ``` -------------------------------- ### OKD.io Markdown - Inline Code Snippet Syntax Source: https://docs.okd.io/latest/web_console/creating-quick-start-tutorials Demonstrates the markdown syntax for inline code snippets in OKD.io quick starts, including options for copying or executing the code. ```markdown `code block`{{copy}} `code block`{{execute}} ``` -------------------------------- ### Link to Next Quick Start (YAML) Source: https://docs.okd.io/latest/web_console/creating-quick-start-tutorials Shows how to establish a link to another quick start within the YAML configuration by specifying the target quick start's name. ```yaml nextQuickStart: - add-healthchecks ``` -------------------------------- ### Get Install Plan Name from Subscription using oc CLI Source: https://docs.okd.io/latest/networking/networking_operators/aws_load_balancer_operator/install-aws-load-balancer-operator This command retrieves the install plan name from a specific subscription within a given namespace. It uses `oc get subscription` with a template to extract the `.status.installplan.name`. ```bash $ oc -n aws-load-balancer-operator \ get subscription aws-load-balancer-operator \ --template='{{.status.installplan.name}}{{"\n"}}' ``` -------------------------------- ### Cluster Role for Managing ClusterRoles and ClusterRoleBindings Source: https://docs.okd.io/latest/extensions/ce/managing-ce This ClusterRole defines permissions for creating, listing, watching, getting, updating, patching, and deleting ClusterRoles and ClusterRoleBindings. It includes an example of how to scope permissions to specific resource names. ```yaml apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: name: pipelines-installer-clusterrole rules: - apiGroups: - rbac.authorization.k8s.io resources: - clusterroles verbs: - create - list - watch - apiGroups: - rbac.authorization.k8s.io resources: - clusterroles verbs: - get - update - patch - delete resourceNames: - "*" - apiGroups: - rbac.authorization.k8s.io resources: - clusterrolebindings verbs: - create - list - watch - apiGroups: - rbac.authorization.k8s.io resources: - clusterrolebindings verbs: - get - update - patch - delete resourceNames: - "*" ``` -------------------------------- ### Highlight Component in Quick Start Markdown Source: https://docs.okd.io/latest/web_console/creating-quick-start-tutorials Illustrates the markdown syntax used within OpenShift Quick Starts to highlight specific components in the web console using the `highlight` keyword followed by an element ID. ```markdown [Perspective switcher]{{highlight qs-perspective-switcher}} ``` ```markdown [Home]{{highlight qs-nav-home}} [Operators]{{highlight qs-nav-operators}} [Workloads]{{highlight qs-nav-workloads}} [Serverless]{{highlight qs-nav-serverless}} [Networking]{{highlight qs-nav-networking}} [Storage]{{highlight qs-nav-storage}} [Service catalog]{{highlight qs-nav-servicecatalog}} [Compute]{{highlight qs-nav-compute}} [User management]{{highlight qs-nav-usermanagement}} [Administration]{{highlight qs-nav-administration}} ``` -------------------------------- ### List OpenShift Resources via CLI Source: https://docs.okd.io/latest/post_installation_configuration/preparing-for-users Demonstrates how to list various OpenShift resources using the 'oc get' command. This includes resources like ResourceQuotas, DeploymentConfigs, and Imagestreams, along with their available subcommands (e.g., 'log', 'status'). ```bash oc get resourcequotas oc get deploymentconfigs.apps.openshift.io oc get imagestreams.image.openshift.io ``` -------------------------------- ### Get Install Plan Name (CLI) Source: https://docs.okd.io/latest/scalability_and_performance/node-observability-operator Retrieves the name of the install plan for the Node Observability Operator subscription. This command uses 'oc' to get the subscription details in YAML format and 'yq' to extract the install plan name from the status. ```bash $ oc -n node-observability-operator get sub node-observability-operator -o yaml | yq '.status.installplan.name' ``` -------------------------------- ### Initiate OpenShift Installation Source: https://docs.okd.io/latest/disconnected/mirroring/installing-mirroring-installation-images Starts the OpenShift installation process for clusters using installer-provisioned infrastructure. This command is typically run after the installation program has been extracted. ```bash openshift-install ``` -------------------------------- ### OKD.io Markdown - Multi-line Code Snippet Syntax Source: https://docs.okd.io/latest/web_console/creating-quick-start-tutorials Demonstrates the markdown syntax for multi-line code snippets in OKD.io quick starts, allowing for copying or executing blocks of code. ```markdown ``` multi line code block ```{{copy}} ``` multi line code block ```{{execute}} ``` -------------------------------- ### Install Network Observability Operator Source: https://docs.okd.io/latest/observability/network_observability/installing-operators Step-by-step guide to installing the Network Observability Operator using the OKD web console's OperatorHub. ```APIDOC ## Install Network Observability Operator ### Description Install the Network Observability Operator from the OperatorHub in the OKD web console. This process enables the `FlowCollector` custom resource definition (CRD). ### Method N/A (Installation via UI) ### Endpoint N/A ### Prerequisites - Loki Operator version 5.7+ (if using Loki) - `cluster-admin` privileges - Supported architecture (`amd64`, `ppc64le`, `arm64`, or `s390x`) - CPU supported by Red Hat Enterprise Linux (RHEL) 9 - OVN-Kubernetes as the main network plugin ### Procedure 1. Navigate to **Operators** → **OperatorHub** in the OKD web console. 2. Select **Network Observability Operator** and click **Install**. 3. Enable cluster monitoring by selecting the `Enable Operator recommended cluster monitoring on this Namespace` checkbox. 4. Go to **Operators** → **Installed Operators**. 5. Under Provided APIs for Network Observability, click the **Flow Collector** link. 6. On the **Flow Collector** tab, click **Create FlowCollector**. 7. Configure the `FlowCollector` settings: - **spec.agent.ebpf.Sampling**: Adjust flow sampling rate. Lower values increase resource utilization. - **spec.loki.mode**: Set to `LokiStack` for automatic configuration or `Manual` for more control. - **spec.loki.lokistack.name**: Specify the name of your `LokiStack` resource (e.g., `loki`). - **Optional**: Configure Kafka for large-scale environments or export flows to Kafka/IPFIX if not using Loki. 8. Click **Create**. ``` -------------------------------- ### InstallPlans API (operators.coreos.com) Source: https://docs.okd.io/latest/post_installation_configuration/preparing-for-users API endpoints for managing install plans. Includes operations for creation, deletion, modification, retrieval, and monitoring. ```APIDOC ## InstallPlans API (operators.coreos.com) ### Description Manages install plans. ### Method N/A ### Endpoint /apis/operators.coreos.com/v1alpha1/installplans ### Parameters N/A ### Operations - create - update - patch - delete - get - list - watch ``` -------------------------------- ### Example ClusterExtension CR for Pipelines Operator Source: https://docs.okd.io/latest/extensions/ce/managing-ce This is an example YAML configuration for a ClusterExtension CR, specifically for installing the pipelines-operator. It demonstrates how to set the required fields like namespace, service account, package name, and version. ```yaml apiVersion: olm.operatorframework.io/v1 kind: ClusterExtension metadata: name: pipelines-operator spec: namespace: pipelines serviceAccount: name: pipelines-installer source: sourceType: Catalog catalog: packageName: openshift-pipelines-operator-rh version: "1.14.x" ``` -------------------------------- ### Create Installation Directory Source: https://docs.okd.io/latest/installing/installing_oci/installing-oci-agent-based-installer Creates a new directory to store the configuration files required for the OKD cluster installation. This is a prerequisite step before configuring the install-config.yaml file. ```bash $ mkdir ~/ ``` -------------------------------- ### Example install-config.yaml for AWS Wavelength Zones Source: https://docs.okd.io/latest/installing/installing_aws/ipi/installing-aws-wavelength-zone An example of a complete 'install-config.yaml' file configured to install an OKD cluster in the 'us-west-2' AWS Region, extending edge nodes to Wavelength Zones in Los Angeles and Las Vegas. ```yaml apiVersion: v1 baseDomain: example.com metadata: name: cluster-name platform: aws: region: us-west-2 compute: - name: edge platform: aws: zones: - us-west-2-wl1-lax-wlz-1 - us-west-2-wl1-las-wlz-1 pullSecret: '{"auths": ...}' sshKey: 'ssh-ed25519 AAAA...' #... ``` -------------------------------- ### OKD.io Navigation Links - Common Source: https://docs.okd.io/latest/web_console/creating-quick-start-tutorials Represents common navigation links available across the OKD.io website, providing access to core features. ```markdown [Builds]{{highlight qs-nav-builds}} [Pipelines]{{highlight qs-nav-pipelines}} [Monitoring]{{highlight qs-nav-monitoring}} ``` -------------------------------- ### Create Live Installation ISO with openshift-install Source: https://docs.okd.io/latest/edge_computing/image_base_install/ibi-understanding-image-based-install This snippet demonstrates using the `openshift-install` program to create a live installation ISO for a single-node OpenShift cluster. This ISO can then be used to preinstall configured instances onto multiple hosts, streamlining the deployment process. ```bash openshift-install create manifests --dir= ``` ```bash openshift-install create iso --dir= --disk-size= ``` -------------------------------- ### Check Install Plan Status using oc CLI Source: https://docs.okd.io/latest/networking/networking_operators/aws_load_balancer_operator/install-aws-load-balancer-operator This command checks the status phase of an install plan. It uses `oc get ip` with the install plan name and a template to extract the `.status.phase`. ```bash $ oc -n aws-load-balancer-operator \ get ip \ --template='{{.status.phase}}{{"\n"}}' ``` -------------------------------- ### Additional Trust Bundle Example for Image-Based Installation Source: https://docs.okd.io/latest/edge_computing/image_base_install/ibi-factory-image-based-install This snippet shows how to include a PEM-encoded X.509 certificate bundle to be added to the installation ISO's trust anchors. ```yaml additionalTrustBundle: | -----BEGIN CERTIFICATE----- MTICLDCCAdKgAwfBAgIBAGAKBggqhkjOPQRDAjB9MQswCQYRVEQGE ... l2wOuDwKQa+upc4GftXE7C//4mKBNBC6Ty01gUaTIpo= -----END CERTIFICATE----- ``` -------------------------------- ### BuildConfigs API - Instantiate Binary Source: https://docs.okd.io/latest/post_installation_configuration/preparing-for-users API endpoint for instantiating a build configuration with binary input. ```APIDOC ## BuildConfigs API - Instantiate Binary ### Description Instantiates a build configuration with binary input. ### Method POST ### Endpoint /apis/build.openshift.io/v1/buildconfigs/{name}/instantiatebinary ### Parameters #### Path Parameters - **name** (string) - Required - Name of the build configuration ### Operations - create ``` -------------------------------- ### Create OKD installation directory Source: https://docs.okd.io/latest/installing/installing_azure_stack_hub/upi/installing-azure-stack-hub-user-infra Creates a directory to store OKD installation files. This is the initial setup step before running the main installation commands. ```bash $ mkdir $HOME/clusterconfig ``` -------------------------------- ### Explain an OpenShift Resource Source: https://docs.okd.io/latest/cli_reference/openshift_cli/getting-started-cli Provides detailed descriptions and field information for a specific OpenShift resource, such as a Pod. This command helps in understanding the structure and available fields for different Kubernetes/OpenShift objects. ```bash $ oc explain pods ``` -------------------------------- ### Wait for OKD Cluster Installation Completion via CLI Source: https://docs.okd.io/latest/installing/installing_oci/installing-oci-agent-based-installer This command monitors the OKD cluster installation process until it is complete. It uses the 'openshift-install' tool with debug logging enabled. ```bash $ ./openshift-install agent wait-for install-complete --log-level debug ``` -------------------------------- ### Create Application using OpenShift CLI Source: https://docs.okd.io/latest/applications/index Demonstrates how to create an application using the OpenShift CLI (`oc`) by providing components such as source code, binary code, images, and templates. This method allows for programmatic creation of applications within a project. ```bash oc create -f ``` -------------------------------- ### Run openshift-install to create manifests Source: https://docs.okd.io/latest/installing/installing_vsphere/upi/installing-vsphere This command initiates the `openshift-install` process to generate initial manifest files. The user will be prompted for system-specific information. ```bash $ openshift-install create manifests --dir $HOME/clusterconfig ? SSH Public Key ... $ ls $HOME/clusterconfig/openshift/ 99_kubeadmin-password-secret.yaml 99_openshift-cluster-api_master-machines-0.yaml 99_openshift-cluster-api_master-machines-1.yaml 99_openshift-cluster-api_master-machines-2.yaml ... ``` -------------------------------- ### Get Help for a Specific OpenShift CLI Command Source: https://docs.okd.io/latest/cli_reference/openshift_cli/getting-started-cli Retrieves detailed help information for a particular `oc` command, including its usage, flags, and options. This is useful for understanding how to use specific commands like `oc create`. ```bash $ oc create --help ``` -------------------------------- ### VPA Resource Recommendations Example Source: https://docs.okd.io/latest/nodes/pods/nodes-pods-vertical-autoscaler Example of pod resource limits and requests before VPA adjustment. ```yaml resources: limits: cpu: 1 memory: 500Mi requests: cpu: 500m memory: 100Mi ``` -------------------------------- ### Create Ignition Configuration Files Source: https://docs.okd.io/latest/support/troubleshooting/troubleshooting-installations Generates Ignition configuration files required for initiating an OKD installation. These files are typically created before starting the installation process. ```bash ./openshift-install create ignition-configs --dir=./install_dir ``` -------------------------------- ### Example coreos-installer Command Source: https://docs.okd.io/latest/machine_management/user_infra/adding-bare-metal-compute-user-infra An example demonstrating the `coreos-installer` command for a bootstrap node installation. It specifies the Ignition URL pointing to an HTTP server (192.168.1.2:80), the target device (`/dev/sda`), and the SHA512 hash of the Ignition configuration file. ```bash $ sudo coreos-installer install --ignition-url=http://192.168.1.2:80/installation_directory/bootstrap.ign /dev/sda --ignition-hash=sha512-a5a2d43879223273c9b60af66b44202a1d1248fc01cf156c46d4a79f552b6bad47bc8cc78ddf0116e80c59d2ea9e32ba53bc807afbca581aa059311def2c3e3b ``` -------------------------------- ### Example configuration for AWS Local Zones installation Source: https://docs.okd.io/latest/installing/installing_aws/ipi/installing-aws-localzone This is a complete example of an `install-config.yaml` file configured for installing an OKD cluster in the `us-west-2` AWS Region, extending edge nodes to Local Zones in `Los Angeles` and `Las Vegas`. It includes the base domain, cluster name, AWS region, compute node zones, pull secret, and SSH key. ```yaml apiVersion: v1 baseDomain: example.com metadata: name: cluster-name platform: aws: region: us-west-2 compute: - name: edge platform: aws: zones: - us-west-2-lax-1a - us-west-2-lax-1b - us-west-2-las-1a pullSecret: '{"auths": ...}' sshKey: 'ssh-ed25519 AAAA...' #... ```