Getting started
Introduction
Kubernetes/OKD/Openshift can be very overwhelming at first, with many new concepts and vocabulary to learn. We strongly advise you to watch the videos Containers 101 and Containers for dummies. To really grasp what the possibilities are, you need to play around and read up on the material, see below for a list of additional resources.
Kubernetes and OKD are very alike, but some small differences exist, e.g.:
- Kubernetes uses Namespace, OKD uses Project
- Kubernetes uses Ingress, OKD uses Route
Other keywords/core objects can be found here
All Kubernetes objects can be used in OKD without any issues.
Core things you need to do to get started with our container platform after access has been established:
- Log into the console and look around. Everything can be done in the GUI.
-
A standard namespace/project often has the following core components:
- Deployment: a manifest that describes which containers will run in your pod
- Service: an object that makes Pods available on the network so that clients can interact with it
- Route: allows you to expose your service at a public URL. It can be secured or unsecured, depending on the network security configuration of your application.
When you have become familiar with OKD, we advise using ArgoCD, see ArgoCD and GitOps.
Using the command line
It is often faster to do tasks in the terminal and easier to comprehend how your application is working in OKD.
Getting the binary
Go to https://github.com/okd-project/okd/releases and expand "Assets" for the latest release. Linux users will typically want the file named openshift-client-linux-amd64-rhel9-*. It contains a single binary oc which works on all recent distros.
Logging in
First log in to the web console. Click on your username in top right corner and choose "Copy login command". Click "Display Token" to view a token which is valid for 24 hours.
A convenience function for your .bashrc to jump to this page:
oc_token() {
local paas=${1-paas3}
xdg-open "https://oauth-openshift.apps.${paas}.rlnc.eu/oauth/authorize?client_id=openshift-browser-client&redirect_uri=https%3A%2F%2Foauth-openshift.apps.${paas}.rlnc.eu%2Foauth%2Ftoken%2Fdisplay&response_type=code"
}
oc login
The Display Token web page will give you a command you can copy-paste into your shell.
Registry login
The same token can be used to log into OKD's registry.
podman and docker are interchangeable. On Linux podman is recommended.
$ podman login registry.apps.paas3.rlnc.eu
Username: <anything, can be empty>
Password: sha256~8ys…YpY
Login Succeeded!
Next steps
- Working with container images: registries, pull secrets and ImageStreams
- Persistent storage
- Dedicated ingress
- ArgoCD and GitOps
- Secrets with KSOPS
- Best practices
- FAQ
- Related services
Recommended reading
-
In particular:
- Containers
- Workloads (
Deployment,ReplicaSet,StatefulSet,DaemonSet,Job)
All resources are objects with some operations in common:
- kubectl and kustomize book
- KSOPS upstream documentation
- ArgoCD upstream documentation