How to install kubectl k8s command line using terminal

sudo apt-get update && sudo apt-get install -y apt-transport-https gnupg2 curl
curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add -
echo "deb https://apt.kubernetes.io/ kubernetes-xenial main" | sudo tee -a /etc/apt/sources.list.d/kubernetes.list
sudo apt-get update
sudo apt-get install -y kubectl
Add to my src(0)

No account yet? Register

Spread the love

Check port exclusion on Windows

These ports are blocked by default if opening from WSL, so either make exception for it or open a new port, for example nodejs port 3000 cannot be open from WSL

 netsh int ipv4 show excludedportrange protocol=tcp
 Protocol tcp Port Exclusion Ranges

Start Port    End Port
----------    --------
      1051        1150
      1151        1250
      1338        1437
      1438        1537
      1538        1637
      1638        1737
      1766        1865
      1938        2037
      2038        2137
      2180        2279
      2280        2379
      2380        2479
      2480        2579
      2699        2798
      2830        2929
      2930        3029
      3030        3129
      3130        3229
      3230        3329
      3430        3529
      3530        3629
      3630        3729
      3757        3856
      3857        3956
      3957        4056
      4057        4156
      4157        4256
      4315        4414
      4466        4565
      4566        4665
      5357        5357
      5426        5426
     50000       50059     *
     54235       54235
     54236       54236

* - Administered port exclusions.
Add to my src(0)

No account yet? Register

Spread the love

Docker cannot start Elasticsearch

If you run Elasticsearch in docker, you’ll probably run into the same issue as mine

ERROR: [1] bootstrap checks failed
elasticsearch_1      | [1]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]

To fix this, just run the following command:

sudo sysctl -w vm.max_map_count=262144
Add to my src(0)

No account yet? Register

Spread the love

Nginx reverse proxy for Java Springboot 8080

server {
        listen 80;
        server_name boot.example.com;
        
        location / {
                proxy_pass http://localhost:8080;
                proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
                proxy_set_header X-Forwarded-Proto $scheme;
                proxy_set_header X-Forwarded-Port $server_port;
        }
}
Add to my src(0)

No account yet? Register

Spread the love

Swap size vs RAM Linux

RAM Size / Swap Size (Without Hibernation) / Swap size (With Hibernation)
256MB 256MB 512MB
512MB 512MB 1GB
1GB 1GB 2GB
2GB 1GB 3GB
3GB 2GB 5GB
4GB 2GB 6GB
6GB 2GB 8GB
8GB 3GB 11GB
12GB 3GB 15GB
16GB 4GB 20GB
24GB 5GB 29GB
32GB 6GB 38GB
64GB 8GB 72GB
128GB 11GB 139GB

Add to my src(0)

No account yet? Register

Spread the love

How to quickly install kafka

The following steps will help install and run kafka quickly

wget https://www.apache.org/dyn/closer.cgi?path=/kafka/2.6.0/kafka_2.13-2.6.0.tgz
tar -xzf kafka_2.13-2.6.0.tgz
cd kafka_2.13-2.6.0
bin/zookeeper-server-start.sh config/zookeeper.properties &
bin/kafka-server-start.sh config/server.properties &
Add to my src(0)

No account yet? Register

Spread the love

Install VSCode on Linux Mint using Terminal

sudo apt update
sudo apt install apt-transport-https
curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg
sudo install -o root -g root -m 644 microsoft.gpg /etc/apt/trusted.gpg.d/
sudo apt update -y
sudo apt install code -y
Add to my src(0)

No account yet? Register

Spread the love