Skip to content

Instantly share code, notes, and snippets.

View pichuang's full-sized avatar

Phil Huang pichuang

View GitHub Profile
@pichuang
pichuang / ENV
Created April 17, 2024 05:11
Disable ARM_PROVIDER_ENHANCED_VALIDATION
$ ARM_PROVIDER_ENHANCED_VALIDATION=false terraform plan
Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the
following symbols:
+ create
Terraform will perform the following actions:
# azurerm_resource_group.rg-taiwannorth will be created
+ resource "azurerm_resource_group" "rg-taiwannorth" {
helm repo add ingress-nginx https://kubernetes.github.io/ingress-nginx
helm repo update
helm install ingress-nginx ingress-nginx/ingress-nginx \
--create-namespace \
--namespace ingress-basic \
--set controller.service.annotations."service\.beta\.kubernetes\.io/azure-load-balancer-health-probe-request-path"=/healthz
---
apiVersion: apps/v1
kind: Deployment
spec:
selector:
matchLabels:
app: night9-app
component: night9-app
node-type: worker
progressDeadlineSeconds: 600
{
"id": "/subscriptions/964df7ca-3f8/providers/Microsoft.Authorization/roleDefinitions/fd429c21-039b-4ba7-bfb3-f791a6ce8e94",
"properties": {
"roleName": "Starkiller",
"description": "see: https://linuxacademy.atlassian.net/wiki/spaces/ET/pages/818348034/Student+Lab+Permissions",
"assignableScopes": [
"/subscriptions/9ed9933ef0",
],
"permissions": [
{
@pichuang
pichuang / autounattend.xml
Last active June 13, 2022 02:31
Default Values for TKG Windows Nodes
<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend">
<settings pass="windowsPE">
<component name="Microsoft-Windows-PnpCustomizationsWinPE" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS"
xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<DriverPaths>
<PathAndCredentials wcm:action="add" wcm:keyValue="A">
<Path>a:\</Path>
</PathAndCredentials>
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: webserver-simple-deployment
spec:
replicas: 2
selector:
matchLabels:
app: webserver-simple-app
fdisk -l
df -h
fdisk /dev/sda
...
pvcreate /dev/sda3
vgdisplay | grep "VG Name"
vgextend ubuntu-vg /dev/sda3
lvdisplay | grep "LV Path"
lvextend /dev/ubuntu-vg/ubuntu-lv /dev/sda3
$ cat squid.conf
#
# Recommended minimum configuration:
#
# allow all requests
acl all src 0.0.0.0/0
http_access allow all
# And finally deny all other access to this proxy
$ tail -f /Users/pichuang/Library/Logs/VMware\ Fusion/vmware-vmfusion.log
2022-02-10T08:12:59.643Z In(05) VMware Fusion VMMgr::OpenVM (cfgPath=/Users/pichuang/vm_pool/CentOS 7 64-bit.vmwarevm/CentOS 7 64-bit.vmx)
2022-02-10T08:12:59.664Z In(05) host-24220517 /Users/pichuang/vm_pool/CentOS 7 64-bit.vmwarevm/CentOS 7 64-bit.vmx: Reloading config state.
2022-02-10T08:12:59.671Z In(05) host-24220517 VMHS: Transitioned vmx/execState/val to poweredOff
2022-02-10T08:12:59.680Z In(05) RemoteDeviceMgr VTHREAD 123145527058432 "RemoteDeviceMgr" tid 24220520
2022-02-10T08:12:59.680Z In(05) vigorCnx VTHREAD 123145527595008 "vigorCnx" tid 24220521
2022-02-10T08:12:59.682Z In(05) VMware Fusion SnapshotTree: Emitting refresh (/Users/pichuang/vm_pool/CentOS 7 64-bit.vmwarevm/CentOS 7 64-bit.vmx)
2022-02-10T08:12:59.684Z In(05) vigorCnx VigorOfflineGetToolsVersion: updated tools version to 0
2022-02-10T08:12:59.685Z In(05) VMware Fusion ReadProxyFile: Failed to read file: /etc/vmware/hostd/proxy.xml
2022-02-10T08:12:59.692Z In
@pichuang
pichuang / fluent.conf
Created January 3, 2022 06:33
Tanzu Kubernetes Grid - VMware Log Insight
<source>
@id in_tail_container_logs
@type tail
path /var/log/containers/*.log
pos_file /var/log/fluentd-containers.log.pos
tag raw.kubernetes.*
read_from_head true
# Open below line if you need have filename as tag field (now without prefix kubernetes.)
# path_key tag
<parse>