Skip to content

Instantly share code, notes, and snippets.

View rodolof's full-sized avatar
Working from home

Rodolfo Casas rodolof

Working from home
  • Rodolfo Casas
View GitHub Profile
rcarrata /
Last active October 14, 2021 13:52
Networking Example - hostNetwork | hostPID | hostIPC | hostPort | NodePort | Capabilities examples
#### Prereqs
kubectl create ns influx
oc adm policy add-scc-to-user anyuid -z default -n influx
#### HostNetwork
# pods in the host network of a node can communicate with all pods on all nodes without NAT
# Not using a separated network namespace. The pod will see the entire ip stack
cat <<EOF > /tmp/influxdb-hostnetwork.yaml
rcarrata /
Last active October 27, 2023 19:27
Script for regenerating the kubeconfig for system:admin user
echo "create a certificate request for system:admin user"
openssl req -new -newkey rsa:4096 -nodes -keyout $AUTH_NAME.key -out $AUTH_NAME.csr -subj "/CN=system:admin"
echo "create signing request resource definition"
View ansible-lineinfile-examples.yml
## credit:
- hosts: alpine_install
user: root
# - name: create a complete empty file
# command: /usr/bin/touch /test/test.conf
- name: create a new file with lineinfile