Skip to content

Instantly share code, notes, and snippets.

@sallyom
Last active December 16, 2022 14:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sallyom/a5bbf04276aeb1bce06d803b4aaad501 to your computer and use it in GitHub Desktop.
Save sallyom/a5bbf04276aeb1bce06d803b4aaad501 to your computer and use it in GitHub Desktop.
oc describe node
$ df -Th
Filesystem Type Size Used Avail Use% Mounted on
devtmpfs devtmpfs 3.8G 0 3.8G 0% /dev
tmpfs tmpfs 3.8G 0 3.8G 0% /dev/shm
tmpfs tmpfs 3.8G 25M 3.8G 1% /run
/dev/mapper/rhel-root xfs 70G 5.4G 64G 8% /
/dev/vda1 xfs 794M 214M 581M 27% /boot
/dev/vda2 vfat 200M 8.0K 200M 1% /boot/efi
tmpfs tmpfs 777M 0 777M 0% /run/user/1000
----------------------------------------------------------
$ oc describe node
Name: microshift-starter.local
Roles: control-plane,master,worker
Labels: beta.kubernetes.io/arch=amd64
beta.kubernetes.io/os=linux
kubernetes.io/arch=amd64
kubernetes.io/hostname=microshift-starter.local
kubernetes.io/os=linux
node-role.kubernetes.io/control-plane=
node-role.kubernetes.io/master=
node-role.kubernetes.io/worker=
topology.topolvm.io/node=microshift-starter.local
Annotations: capacity.topolvm.io/00default: 0
capacity.topolvm.io/default: 0
csi.volume.kubernetes.io/nodeid: {"topolvm.io":"microshift-starter.local"}
k8s.ovn.org/host-addresses: ["192.168.122.96"]
k8s.ovn.org/l3-gateway-config:
{"default":{"mode":"local","interface-id":"br-ex_microshift-starter.local","mac-address":"52:54:00:4c:05:ed","ip-addresses":["192.168.122....
k8s.ovn.org/node-chassis-id: 75c0668d-9ad4-4029-9a9a-c9a74a3425be
k8s.ovn.org/node-gateway-router-lrp-ifaddr: {"ipv4":"100.64.0.2/16"}
k8s.ovn.org/node-mgmt-port-mac-address: d6:fb:86:d4:64:f2
k8s.ovn.org/node-primary-ifaddr: {"ipv4":"192.168.122.96/24"}
k8s.ovn.org/node-subnets: {"default":"10.42.0.0/24"}
node.alpha.kubernetes.io/ttl: 0
volumes.kubernetes.io/controller-managed-attach-detach: true
CreationTimestamp: Fri, 16 Dec 2022 13:06:11 +0000
Taints: <none>
Unschedulable: false
Lease:
HolderIdentity: microshift-starter.local
AcquireTime: <unset>
RenewTime: Fri, 16 Dec 2022 13:18:14 +0000
Conditions:
Type Status LastHeartbeatTime LastTransitionTime Reason Message
---- ------ ----------------- ------------------ ------ -------
MemoryPressure False Fri, 16 Dec 2022 13:14:21 +0000 Fri, 16 Dec 2022 13:06:11 +0000 KubeletHasSufficientMemory kubelet has sufficient memory available
DiskPressure False Fri, 16 Dec 2022 13:14:21 +0000 Fri, 16 Dec 2022 13:06:11 +0000 KubeletHasNoDiskPressure kubelet has no disk pressure
PIDPressure False Fri, 16 Dec 2022 13:14:21 +0000 Fri, 16 Dec 2022 13:06:11 +0000 KubeletHasSufficientPID kubelet has sufficient PID available
Ready True Fri, 16 Dec 2022 13:14:21 +0000 Fri, 16 Dec 2022 13:06:41 +0000 KubeletReady kubelet is posting ready status
Addresses:
InternalIP: 192.168.122.96
Hostname: microshift-starter.local
Capacity:
cpu: 4
ephemeral-storage: 70666Mi
hugepages-1Gi: 0
hugepages-2Mi: 0
memory: 7951620Ki
pods: 250
Allocatable:
cpu: 4
ephemeral-storage: 66688804344
hugepages-1Gi: 0
hugepages-2Mi: 0
memory: 7849220Ki
pods: 250
System Info:
Machine ID: 9338c543ae7f4fab827e8fe6c674cdab
System UUID: 9338c543-ae7f-4fab-827e-8fe6c674cdab
Boot ID: ef845884-2f12-4e25-8d4f-5abd437eecb3
Kernel Version: 4.18.0-425.3.1.el8.x86_64
OS Image: Red Hat Enterprise Linux 8.7 (Ootpa)
Operating System: linux
Architecture: amd64
Container Runtime Version: cri-o://1.25.1-2.rhaos4.12.gitafa0c57.el8
Kubelet Version: v1.25.0
Kube-Proxy Version: v1.25.0
PodCIDR: 10.42.0.0/24
PodCIDRs: 10.42.0.0/24
Non-terminated Pods: (8 in total)
Namespace Name CPU Requests CPU Limits Memory Requests Memory Limits Age
--------- ---- ------------ ---------- --------------- ------------- ---
openshift-dns dns-default-fhwlb 60m (1%) 0 (0%) 110Mi (1%) 0 (0%) 11m
openshift-dns node-resolver-58mss 5m (0%) 0 (0%) 21Mi (0%) 0 (0%) 12m
openshift-ingress router-default-7c9c47d97f-wvc4f 100m (2%) 0 (0%) 256Mi (3%) 0 (0%) 12m
openshift-ovn-kubernetes ovnkube-master-fm9xh 40m (1%) 0 (0%) 90Mi (1%) 0 (0%) 12m
openshift-ovn-kubernetes ovnkube-node-tj6kx 10m (0%) 0 (0%) 10Mi (0%) 0 (0%) 12m
openshift-service-ca service-ca-66b8869cf9-76j6c 10m (0%) 0 (0%) 120Mi (1%) 0 (0%) 12m
openshift-storage topolvm-controller-78876c5fcd-55pm2 350m (8%) 0 (0%) 350Mi (4%) 0 (0%) 12m
openshift-storage topolvm-node-5tc9z 500m (12%) 0 (0%) 500Mi (6%) 0 (0%) 11m
Allocated resources:
(Total limits may be over 100 percent, i.e., overcommitted.)
Resource Requests Limits
-------- -------- ------
cpu 1075m (26%) 0 (0%)
memory 1457Mi (19%) 0 (0%)
ephemeral-storage 0 (0%) 0 (0%)
hugepages-1Gi 0 (0%) 0 (0%)
hugepages-2Mi 0 (0%) 0 (0%)
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal Starting 12m kubelet Starting kubelet.
Normal NodeHasSufficientMemory 12m (x2 over 12m) kubelet Node microshift-starter.local status is now: NodeHasSufficientMemory
Normal NodeHasNoDiskPressure 12m (x2 over 12m) kubelet Node microshift-starter.local status is now: NodeHasNoDiskPressure
Normal NodeHasSufficientPID 12m (x2 over 12m) kubelet Node microshift-starter.local status is now: NodeHasSufficientPID
Normal NodeAllocatableEnforced 12m kubelet Updated Node Allocatable limit across pods
Normal RegisteredNode 12m node-controller Node microshift-starter.local event: Registered Node microshift-starter.local in Controller
Normal NodeReady 11m kubelet Node microshift-starter.local status is now: NodeReady
-------------------------------------------------------
$ cat pvtest.yaml
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: my-lv-pvc
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 200Mi
---
apiVersion: v1
kind: Pod
metadata:
name: my-pod
spec:
securityContext:
seccompProfile:
type: RuntimeDefault
runAsNonRoot: true
containers:
- name: my-pod
image: nginx
command: ["/usr/bin/sh", "-c"]
args: ["sleep", "1h"]
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
volumeMounts:
- mountPath: /mnt
name: my-volume
volumes:
- name: my-volume
persistentVolumeClaim:
claimName: my-lv-pvc
---------------------------------------
$ oc get csistoragecapacity -n openshift-storage -o yaml
apiVersion: v1
items:
- apiVersion: storage.k8s.io/v1
capacity: "0"
kind: CSIStorageCapacity
metadata:
creationTimestamp: "2022-12-16T14:26:18Z"
generateName: csisc-
labels:
csi.storage.k8s.io/drivername: topolvm.io
csi.storage.k8s.io/managed-by: external-provisioner
name: csisc-5jz4t
namespace: openshift-storage
ownerReferences:
----------------------------
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment