OpenShift Container Platform

Recipe

  1. Using the web console:
    1. Review cluster utilization
    2. Review high severity alerts
    3. Review USE method cluster utilization for overall utlization
    4. Review the Cluster Compute Resources Dashboard for high utilization projects
    5. For high utilization projects, review the Project Compute Resources Dashboard
  2. Review OpenShift Container Platform best practices

Best practices

Web Console

Cluster Utilization

Administrator } Overview (/dashboards) shows CPU, memory, filesystem, and network utilization for the cluster. For example:

Alerts

Administrator } Monitoring } Alerting shows various alerts of different severities. Sort by severity in descending order.

Monitoring
Grafana USE Method Cluster Dashbaord

Administrator } Monitoring } Dashboards } Dashboard = USE Method / Cluster (/monitoring/dashboards/grafana-dashboard-node-cluster-rsrc-use) shows detailed cluster utilization with the USE method.

Grafana USE Method Node Dashbaord

Administrator } Monitoring } Dashboards } Dashboard = USE Method / Node (/monitoring/dashboards/grafana-dashboard-node-cluster-rsrc-use) shows detailed cluster utilization with the USE method.

Cluster Compute Resources Dashboard

Administrator } Monitoring } Dashboards } Dashboard = Kubernetes / Compute Resources / Cluster (/monitoring/dashboards/grafana-dashboard-k8s-resources-cluster) shows detailed cluster utilization by project.

Project Compute Resources Dashboard

Administrator } Monitoring } Dashboards } Dashboard = Kubernetes / Compute Resources / Namespaces (Pods) (/monitoring/dashboards/grafana-dashboard-k8s-resources-namespace) shows detailed utilization by project.

Images
  • Show images in the local registry: Builds } Image Streams
Applications
  • Deploy application from image in the local registry:
    1. Developer } Topology
    2. Project=$PROJECT
    3. Container Image
    4. Image stream tag from internal registry
    5. Create

Installation

Installer Provisioned Infrastructure

Installer Provisioned Infrastructure (IPI) performs automated infrastructure and product deployment on Amazon Web Services, Microsoft Azure, Google Cloud Platform, Red Hat OpenStack Platform, and Red Hat Virtualization.

User Provisioned Infrastructure

User Provisioned Infrastructure (UPI) is an installation on pre-existing infrastructure with pre-arranged networking, compute, and storage on Amazon Web Services, Microsoft Azure, Google Cloud Platform, VMware vSphere, RedHat Open Stack Platform, IBM z, IBM Power Systems, and bare metal.

Secrets

To perform installation, pull secrets are required from https://www.openshift.com/try.

Amazon Web Services

The OpenShift Installer uses Terraform on AWS with a default machine type of m4.large. The AWS credentials must have administrator privileges.

Pre-requisites:

  1. Create a Route 53 public domain.
  2. Create an SSH key pair without a password: ssh-keygen -f ~/.ssh/cluster-key

Then run:

  1. curl "https://s3.amazonaws.com/aws-cli/awscli-bundle.zip" -o "awscli-bundle.zip"
  2. unzip awscli-bundle.zip
  3. ./awscli-bundle/install -i /usr/local/aws -b /bin/aws
  4. wget https://mirror.openshift.com/pub/openshift-v4/clients/ocp/4.4.3/openshift-install-linux-4.4.3.tar.gz
  5. tar zxvf openshift-install-linux-*.tar.gz -C /usr/bin
  6. wget https://mirror.openshift.com/pub/openshift-v4/clients/ocp/4.4.3/openshift-client-linux-4.4.3.tar.gz
  7. tar zxvf openshift-client-linux-*.tar.gz -C /usr/bin
  8. oc completion bash >/etc/bash_completion.d/openshift
  9. Create AWS credentials
    $ mkdir $HOME/.aws/
    $ cat << EOF >> $HOME/.aws/credentials
    > [default]
    > aws_access_key_id = ... access key ...
    > aws_secret_access_key = ... secret ...
    > region = ... region ...
    > EOF
  10. Check AWS works: aws sts get-caller-identity
  11. Download Pull Secret from https://cloud.redhat.com/openshift/install/aws/installer-provisioned
  12. openshift-install create cluster --dir $HOME/cluster-$NAME
    1. Use separate steps to customize, e.g. install-config.yaml
  13. In another window, tail -f ${HOME}/cluster-$NAME/.openshift_install.log
  14. export KUBECONFIG=$HOME/cluster-$NAME/auth/kubeconfig
  15. oc whoami
  16. openshift-install graph
  17. aws ec2 describe-instances --output table

Persistent Storage

Persistent storage includes:

  • Raw devices such as iSCSI and Fibre Channel
  • Enterprise storage such as NFS
  • Cloud-type storage such as Ceph, AWS EBS, pDisk, etc.