Debugging
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This only went GA for OpenShift in 4.17 | |
# | |
# https://docs.openshift.com/container-platform/4.17/machine_configuration/machine-config-node-disruption.html | |
apiVersion: operator.openshift.io/v1 | |
kind: MachineConfiguration | |
metadata: | |
name: cluster | |
namespace: openshift-machine-config-operator | |
spec: | |
nodeDisruptionPolicy: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# get the UID of the running pod and substitute dashes for underscores | |
POD_UID=$(crictl pods --name dns-default -o json | jq -r '.items[0].metadata.uid' | tr "-" "_") | |
# check the cgroup contents if it has resource requests: | |
systemd-cgls /kubepods.slice/kubepods-burstable.slice/kubepods-burstable-pod${POD_UID}.slice | |
# or if it doesn't :o | |
systemd-cgls /kubepods.slice/kubepods-besteffort.slice/kubepods-besteffort-pod${POD_UID}.slice | |
# check the pid max | |
cat /sys/fs/cgroup/kubepods.slice/kubepods-burstable.slice/kubepods-burstable-pod${POD_UID}.slice/pids.max |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" | |
unzip awscliv2.zip | |
./aws/install -i /opt/app-root/share/aws-cli -b /opt/app-root/bin | |
aws s3 --endpoint-url $AWS_S3_ENDPOINT ls s3://$AWS_S3_BUCKET |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: sriovnetwork.openshift.io/v1 | |
kind: SriovNetwork | |
metadata: | |
name: sriovnetwork | |
namespace: openshift-sriov-network-operator | |
spec: | |
ipam: | | |
{ | |
"type": "whereabouts", | |
"range": "172.20.133.0/24", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kind: LDAPSyncConfig | |
apiVersion: v1 | |
url: ldap://ad.example.com:389 | |
insecure: true | |
bindDN: cn=admin,dc=example,dc=com | |
bindPassword: | |
value: "password" | |
rfc2307: | |
groupsQuery: | |
baseDN: "ou=groups,dc=example,dc=com" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/s3/client/list_objects.html | |
# https://boto3.amazonaws.com/v1/documentation/api/latest/guide/s3-uploading-files.html | |
import os | |
import boto3 | |
import botocore | |
s3 = boto3.client('s3', verify=False, region_name="default", endpoint_url=f"https://{os.environ['AWS_S3_ENDPOINT']}") | |
#s3.upload_file('test.txt', os.environ['AWS_S3_BUCKET'], 'test.txt') | |
# response = s3.list_buckets() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
interfaces: | |
- name: bond0 | |
type: bond | |
state: up | |
ipv4: | |
address: | |
- ip: 192.168.126.30 | |
prefix-length: 24 | |
dhcp: false | |
enabled: true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: networking.k8s.io/v1 | |
kind: Ingress | |
metadata: | |
name: test | |
spec: | |
rules: | |
- host: ingress.example.org | |
http: | |
paths: | |
- path: / |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<network xmlns:dnsmasq='http://libvirt.org/schemas/network/dnsmasq/1.0'> | |
<name>default</name> | |
<forward mode='nat'> | |
<nat> | |
<port start='1024' end='65535'/> | |
</nat> | |
</forward> | |
<bridge name='virbr0' stp='on' delay='0'/> | |
<mac address='52:54:00:b1:dd:cf'/> | |
<domain name='redhat.lab' localOnly='yes'/> |
NewerOlder