Wednesday, February 16, 2022

List all resources in a namespace - OpenShift

 

List all resources in a namespace:

 

oc api-resources --verbs=list --namespaced -o name |  xargs -t -n 1 oc get --show-kind --ignore-not-found  -n  <YOUR_NAMESPACE_NAME_HERE>
 



Concluding mind

 

A free mind never concludes

A mind that is full of conclusions is a dead mind, it is not a living mind.  A living mind is a free mind, learning, never concluding.

Krishnamurti in Ojai, California 1973, Talk 3



ImageContentSourcePolicy in OpenShift



ImageContentSourcePolicy (ICSP) 

https://docs.openshift.com/container-platform/4.9/openshift_images/image-configuration.html#images-configuration-registry-mirror_image-configuration


ICSP is used to redirect request to a registry to its mirror. 


apiVersion: operator.openshift.io/v1alpha1

kind: ImageContentSourcePolicy

metadata:

  name: ubi8repo

spec:

  repositoryDigestMirrors:

  - mirrors:

    - example.io/example/ubi-minimal 

    source: registry.access.redhat.com/ubi8/ubi-minimal 

  - mirrors:

    - example.com/example/ubi-minimal

    source: registry.access.redhat.com/ubi8/ubi-minimal

  - mirrors:

    - mirror.example.com/redhat

    source: registry.redhat.io/openshift4 


Just for reference: 
https://docs.openshift.com/container-platform/4.9/rest_api/operator_apis/imagecontentsourcepolicy-operator-openshift-io-v1alpha1.html





Jump server - what is it?


Jump server: 

A jump server (a.k.a jump host/ jump box) is 
a system on a network used to access and manage devices in a separate security zone.

--
A jump server is a hardened and monitored device 

  that spans two dissimilar security zones 

  and provides a controlled means of access between them.

--

DevOps teams use it as a way to establish a clear funnel through which traffic passed to their infrastructure

--

Debug node in openshift


$ oc get nodes

<node details >



 $oc debug node/ip-<info >

Starting pod/ip-...

To use host binaries, run `chroot /host`


Pod IP: 10.0.129.43

If you don't see a command prompt, try pressing enter.

sh-4.4# 

sh-4.4# 

sh-4.4# chroot /host

sh-4.4# cat /etc/containers/registries.conf 

unqualified-search-registries = [ 'docker.io']

sh-4.4# 

sh-4.4# 

sh-4.4# exit

exit

sh-4.4# exit


Removing debug pod ...