This note is to add Go implementation of below problem
https://practice.geeksforgeeks.org/problems/meta-strings/0
Golang playground url : https://play.golang.org/p/jacrGzz8JjJ
Github code url
Thursday, March 28, 2019
Monday, March 25, 2019
How To Create Oracle DB Dataguard in K8S
Please click github link for full details
How To Switch Service Without Changing Apps Connection Details in K8S
Requirement:
In enterprise world, we often have standby or DR services. Sometimes we have active and active services too. When we do switch over service, we need to modify Apps connection details to point to new service. It generates workloads and confusion when we touch Apps configurations In Kubernetes world, the power and flexibility of service save us from these hassles . We can switch services without changing Apps connection details.Solution:
We can use selector in K8S service component to choose which Apps the service is sitting on.
For example:
Primary DB service is on label livesqlsb-db-service and Standby DB service is on label livesqlsb-db-dr-service
To update service to point to standby DB , we simple update selector from livesqlsb-db-service --> livesqlsb-db-dr-service in the yaml file
Then kubectl apply -f <yaml file>
apiVersion: v1
kind: Service
metadata:
labels:
name: livesqlsb-db-service
name: livesqlsb-db-service
namespace: default
spec:
ports:
- port: 1521
protocol: TCP
targetPort: 1521
selector:
name: livesqlsb-db-service or livesqlsb-db-dr-service (update it to be livesqlsb-db-dr-service for standby DB service)
For example:
Primary DB service is on label livesqlsb-db-service and Standby DB service is on label livesqlsb-db-dr-service
To update service to point to standby DB , we simple update selector from livesqlsb-db-service --> livesqlsb-db-dr-service in the yaml file
Then kubectl apply -f <yaml file>
apiVersion: v1
kind: Service
metadata:
labels:
name: livesqlsb-db-service
name: livesqlsb-db-service
namespace: default
spec:
ports:
- port: 1521
protocol: TCP
targetPort: 1521
selector:
name: livesqlsb-db-service or livesqlsb-db-dr-service (update it to be livesqlsb-db-dr-service for standby DB service)
Thursday, March 21, 2019
Go Implementation For Count of strings that can be formed using a, b and c under given constraints
This note is to add Go implementation of below problem
https://practice.geeksforgeeks.org/problems/count-of-strings-that-can-be-formed-using-a-b-and-c-under-given-constraints/0
Golang playground url : https://play.golang.org/p/lkBcz2yE3f_k
Github code url
https://practice.geeksforgeeks.org/problems/count-of-strings-that-can-be-formed-using-a-b-and-c-under-given-constraints/0
Golang playground url : https://play.golang.org/p/lkBcz2yE3f_k
Github code url
Wednesday, March 20, 2019
Go Implementation For surpasser-count
This note is to add Go implementation of below problem
https://practice.geeksforgeeks.org/problems/surpasser-count/0
Golang playground url : https://play.golang.org/p/viFhnbQDSs7
Github code url
https://practice.geeksforgeeks.org/problems/surpasser-count/0
Golang playground url : https://play.golang.org/p/viFhnbQDSs7
Github code url
Subscribe to:
Posts (Atom)