OpenShift Container Platform
Recipe
- Using the web console:
- Review cluster utilization
- Review high severity alerts
- Review USE method cluster utilization for overall utlization
- Review the Cluster Compute Resources Dashboard for high utilization projects
- For high utilization projects, review the Project Compute Resources Dashboard
- Review OpenShift Container Platform best practices
Links
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:
- Developer } Topology
- Project=$PROJECT
- Container Image
- Image stream tag from internal registry
- 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:
- Create a Route 53 public domain.
- Create an SSH key pair without a password:
ssh-keygen -f ~/.ssh/cluster-key
Then run:
curl "https://s3.amazonaws.com/aws-cli/awscli-bundle.zip" -o "awscli-bundle.zip"
unzip awscli-bundle.zip
./awscli-bundle/install -i /usr/local/aws -b /bin/aws
wget https://mirror.openshift.com/pub/openshift-v4/clients/ocp/4.4.3/openshift-install-linux-4.4.3.tar.gz
tar zxvf openshift-install-linux-*.tar.gz -C /usr/bin
wget https://mirror.openshift.com/pub/openshift-v4/clients/ocp/4.4.3/openshift-client-linux-4.4.3.tar.gz
tar zxvf openshift-client-linux-*.tar.gz -C /usr/bin
oc completion bash >/etc/bash_completion.d/openshift
- 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
- Check AWS works:
aws sts get-caller-identity
- Download Pull Secret from https://cloud.redhat.com/openshift/install/aws/installer-provisioned
openshift-install create cluster --dir $HOME/cluster-$NAME
- Use separate steps to customize, e.g.
install-config.yaml
- Use separate steps to customize, e.g.
- In another window,
tail -f ${HOME}/cluster-$NAME/.openshift_install.log
export KUBECONFIG=$HOME/cluster-$NAME/auth/kubeconfig
oc whoami
openshift-install graph
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.