2024年5月14日星期二

Powershell general used command

Set-Alias  k   kuberctl 
Set-Alias  ist   istioctl
Set-Alias  grep   findstr




2024年4月30日星期二

vba PasteFormat

Option Explicit
Sub PasteFormat()

    Dim fromRow As Integer
    Dim sRow As Integer
    Dim eRow As Integer
    
    fromRow = 6
    sRow = 7
    
    Rows(fromRow & ":" & fromRow).Select
    Selection.Copy
    
    Dim thisSheet As Worksheet
    Set thisSheet = ActiveSheet
    fromRow = 6
    sRow = 7
eRow = thisSheet.UsedRange.Rows.Count
Rows(sRow & ":" & thisSheet.UsedRange.Rows.Count).Select Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _ SkipBlanks:=False, Transpose:=False Application.CutCopyMode = False End Sub

2024年4月17日星期三

how to fix local k8s cluster external-ip pending

 

install metallb

  • kubectl apply -f https://raw.githubusercontent.com/metallb/metallb/v0.13.12/config/manifests/metallb-native.yaml
  • #Install IPAddressPool and L2Advertisement
    k apply -f - <<EOF
    apiVersion: metallb.io/v1beta1
    kind: IPAddressPool
    metadata:
      name: default
      namespace: metallb-system
    spec:
      addresses:
      - 172.21.0.10-172.21.0.15
      autoAssign: true
    ---
    apiVersion: metallb.io/v1beta1
    kind: L2Advertisement
    metadata:
      name: default
      namespace: metallb-system
    spec:
      ipAddressPools:
      - default
    
    EOF
    
  • Check external-ip of istio-ingressgateway
    
    > kubectl get svc istio-ingressgateway -n istio-system
    NAME                   TYPE           CLUSTER-IP      EXTERNAL-IP   PORT(S)                                                                      AGE
    istio-ingressgateway   LoadBalancer   10.43.236.164   172.21.0.10   
    15021:31478/TCP,80:32384/TCP,443:31061/TCP,31400:30774/TCP,15443:31366/TCP   82m
    
  • nginx rancher should be in a same network,like rancher-default: 172.21.0.0/16
  • ngingx need send/receive request/response to/from gateway(gateway in rancher container)

2024年4月2日星期二

linux top command

$ top          # CPU使用率順にソート

$ top -a       # メモリ使用率順にソート

$ top -p [PID] # 特定のプロセスを監視

$ top -d1      # 1秒ごとに更新

ref: https://qiita.com/k0kubun/items/7368c323d90f24a00c2f


2024年3月29日星期五

Linux Version/uname/release

> cat /proc/version 

Linux version 4.14.328-248.540.amzn2.x86_64 (mockbuild@ip-10-0-40-16) (gcc version 7.3.1 20180712 (Red Hat 7.3.1-17) (GCC)) #1 SMP Tue Nov 7 03:51:03 UTC 2023

> uname -a 

Linux dashboard-shell-dhh4s 4.14.328-248.540.amzn2.x86_64 #1 SMP Tue Nov 7 03:51:03 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux

> ls /etc/*release

/etc/os-release

> cat /etc/os-release

NAME="SLES"

VERSION="15-SP5"

VERSION_ID="15.5"

PRETTY_NAME="SUSE Linux Enterprise Server 15 SP5"

ID="sles"

ID_LIKE="suse"

ANSI_COLOR="0;32"

CPE_NAME="cpe:/o:suse:sles:15:sp5"

DOCUMENTATION_URL="https://documentation.suse.com/"

2024年2月13日星期二

create jar file from classes/ folder

// create jar file from classes/packagename/*.java. ex
jar --create --file iowebdoc.jar -C classes/

2023年11月15日星期三

git diff

git diff --name-only  tag1 tag2
------
src/test1.dicon
src/test2.dicon
src/test3.dicon


git diff -w --name-status --no-renames tag1 tag2 >file-name-status.txt
MODE |  PATH
----  |---------
M src/test1.dicon
A src/test2.dicon
D src/test3.dicon


git diff -w --numstat --no-renames --diff-filter=M  tag1 tag2 

 > file-numstat.txt
ADD | DEL | PATH
----  |----  |-------
1 1 src/test1.dicon
1 0 src/test2.dicon