Check details of certificate openssl x509 -in /etc/ssl/certs/ca-certificates.crt -text -noout Show certificates in the chain openssl s_client -showcerts -connect host_name:port
This file contains 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
import prefect | |
from datetime import datetime, timezone | |
client = prefect.Client() | |
flows = client.graphql( | |
{ | |
'query': { | |
'flow': { | |
'id' | |
} |
SELinux provides a user, a role, a type, and a level (ls -Z). This information is used to make access control decisions. On DAC systems, access is controlled based on Linux user and group IDs. SELinux policy rules are checked after DAC rules. SELinux policy rules are not used if DAC rules deny access first.
For container to mount the host volume if SELinux is enabled on the host
- Kubernetes
- Enable PodSecurityPolicy in Admission Controller link
- Create PodSecurityPolicy with SeLinux rule link
Number of tables in each namespace
# table count per namespace (environment)
echo "NAMESPACE,TABLE_COUNT"
for namespace in $(echo "list_namespace" | hbase shell -n | grep nxcals)
do
table_count=$(echo "list_namespace_tables '$namespace'" | hbase shell -n | wc -l)
echo "$namespace,$table_count"
done
Link to the master - https://kubernetes.io/docs/reference/kubectl/cheatsheet/
kubectl get services --all-namespaces
kubectl describe services/kubernetes-dashboard -n kube-system
Reading json into Spark Dataframe
method 1 (efficient, specify the schema on construction the dataframe)
from pyspark.sql.types import *
schema = StructType([StructField('aggregated', StringType(), True),
StructField('body', StringType(), True),
StructField('entity', StringType(), True),
StructField('metric_id', StringType(), True),
This file contains 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
# set acl | |
hdfs dfs -setfacl -R -m user:{user_name}:rwx /path/to/the/directory | |
# find the quota | |
hdfs dfs -count -v -q -h /path/to/the/directory | |
# Set the space quota | |
hdfs dfsadmin -setSpaceQuota 500g /path/to/the/directory | |
# Set file / dir (inodes) quota | |
hdfs dfsadmin -setQuota 500000 /path/to/the/directory |
NewerOlder