Monday, January 13, 2020

kubernetes - how to local load balancer

Pre-requirements:
  1. Docker desktop installed.
  2. Kubernetes enabled
  3. Some services already created and running:
kubectl.exe get all                                                            
NAME                             READY STATUS RESTARTS AGE                
pod/httpenv-dd7475946-69wj8      1/1     Running   0          15h              
pod/httpenv-dd7475946-6ncsb      1/1     Running   0          15h              
pod/httpenv-dd7475946-cf46s      1/1     Running   0          15h              
pod/httpenv-dd7475946-lclml      1/1     Running   0          15h               pod/httpenv-dd7475946-nv4br      1/1     Running   0          15h                                                                                               
NAME                 TYPE CLUSTER-IP       EXTERNAL-IP PORT(S) AGE  
service/httpenv      ClusterIP 10.111.175.59    <none>        8888/TCP   15
                                                                                 
NAME                        READY UP-TO-DATE AVAILABLE   AGE
deployment.apps/httpenv     5/5     5            5           15h               
               
                                                                               
NAME                                   DESIRED CURRENT READY AGE    
replicaset.apps/httpenv-dd7475946      5         5         5       15h         

Create LoadBalancer:
  1. Create LoadBalancer as following
kubectl.exe expose deployment.apps/httpenv --port 8888 --name httpenv-lb --type LoadBalancer                                                                     
service/httpenv-lb exposed        
  1. Check the load balancer created
kubectl.exe get service                                                            
NAME         TYPE           CLUSTER-IP       EXTERNAL-IP PORT(S)          AGE
httpenv      ClusterIP   10.111.175.59   <none> 8888/TCP         15h
httpenv-lb   LoadBalancer   10.102.229.139   localhost 8888:31050/TCP   28s          
                                                                                                                                                                       
  1. Test                                                                                                                                                                               
curl localhost:8888                                                                                                                                                                                                                        
{"HOME":"/root","HOSTNAME":"httpenv-dd7475946-cf46s","KUBERNETES_PORT":"tcp://10.96.0.1:443","KUBERNETES_PORT_443_TCP":"tcp://10.96.0.1:443","KUBERNETES_PORT_443_TCP_ADDR":"10.96.0.1","KUBERNETES_PORT_443_TCP_PORT":"443","KUBERNETES_PORT_
443_TCP_PROTO":"tcp","KUBERNETES_SERVICE_HOST":"10.96.0.1","KUBERNETES_SERVICE_PORT":"443","KUBERNETES_SERVICE_PORT_HTTPS":"443","NGINX_HTTP_PORT":"tcp://10.101.186.145:8083","NGINX_HTTP_PORT_8083_TCP":"tcp://10.101.186.145:8083","NGINX_H
TTP_PORT_8083_TCP_ADDR":"10.101.186.145","NGINX_HTTP_PORT_8083_TCP_PORT":"8083","NGINX_HTTP_PORT_8083_TCP_PROTO":"tcp","NGINX_HTTP_SERVICE_HOST":"10.101.186.145","NGINX_HTTP_SERVICE_PORT":"8083","PATH":"/usr/local/sbin:/usr/local/bin:/usr
/sbin:/usr/bin:/sbin:/bin"}                                                                                                                                                                                                                   

Wednesday, October 30, 2019

Wordpress error 504 - hot to troubleshoot and fix

1. In the wordpress root directory, greate file info.php with following php code
<?php phpinfo(); >
2.Access this file
http://[web site]/info.php
if the page loaded but wordpress still response with 504 move to next step. if not - try to restart php service and apace or Nginx
3. Enable debug mode in wp-config.php
define('WP_DEBUG', true);
try to access website and follow the errors to try to understand what caused it. if still 504 error without explanation, move to next step
4. Start to disable instaled plugins one by one. First, set the order of installed plugins by date. 
Very likely one of last installed plugins cause that error

in my case, paid-memberships-pro cause the error.

Monday, April 15, 2019

How to easily store and transfer TRAT digital currency with medooza crypto wallet

Following is simple steps to store ,manage and transfer  TRAT digital currency .

  1. Sign up to medooza wallet https://wallet.medooza.network - this wallet is secure , since no privet keys stored on that wallet.This means You need to keep keys at your own secure place:
  2. Now , go to "add wallet"
  3. In the search box type TRAT
  4. Create Your TRAT wallet
  5. Provide password to protect You wallet transactions
  6.  Write or print your recovery phrase and store it securely offline.
  7. Fill previously saved phrase and create
  8. Congratulation ! You can start to use TRAT wallet

Tuesday, January 29, 2019

Following is simple steps to store ,manage and transfer WAX Token.

Following is simple steps to store ,manage and transfer WAX Token.

  1. Sign up to medooza wallet https://wallet.medooza.network - this wallet is secure , since no privet keys stored on that wallet.This means You need to keep keys at your own secure place:
  2. Now , go to "add wallet"
  3. Then "create custom ERC20token"
  4. According to Wax the contract address is:0x39bb259f66e1c59d5abef88375979b4d20d98022 , copy paste the contract address , if all valid , You will see all other fields filed automatically with all relevant data
  5. Now , you can import you own or create new one, send or receive foodcoin with medooza wallet.
  6.  Simple , fast , secure.

Wednesday, December 12, 2018

How to convert private key to mnemonic ethereum

The easy way is to use medooza wallet .
Go to the ETH and press on "Export"

Enter the wallet password
Unlock and Print