Saturday, August 5, 2023

 Jenkin :


https://www.youtube.com/watch?v=6YZvp2GwT0A

Certificate Authority ?

Problem : How can we trust a website claiming to be who they are ?


Me browser                                                                        https://www.youtube.com


                           -------------------------->

                                give me youtube

                           <-------------------------       
                            
                                youtube certificate contain
                                youtube public key signed by Google CA

                            -------------------------->

                                Google CA is trusted , therefore the youtube 
                                public key is trusted. 
                                here are the new secret key encrypted with youtube public key
                                Due to it was encrypted with youtube public key, 
                                therefore youtube will be able to decrypt it with 
                                youtube private key and able to read the new secret key.           
           
                           <------------------------------->
                               All future communication between my browser and youtube 
                               will be encrypted with the new secret key. 
                               Therefore the commuinication is secure and each party is trust as who they claim.

Wednesday, June 7, 2023

kubectl to create a pod work flow

 






root@eng-app-node:~# more spider.yaml
apiVersion: v1
kind: Pod
metadata:
  name: spider
  namespace: eng
  labels:
    app: spider
    tier: frontend
    environment: training
spec:
  containers:
  - name: tomcat
    image: kulbhushanmayer/tomcat:10.1.5
    ports:
    - containerPort: 8080
      name: tomcat
  - name: vote
    image: kulbhushanmayer/vote:1.1
    ports:
    - containerPort: 80
      name: vote
root@eng-app-node:~# more service.yaml
apiVersion: v1
kind: Service
metadata:
  name: spider-svc
  namespace: eng
  labels:
    app: spider
spec:
  type: ClusterIP
  ports:
  - port: 80
    targetPort: tomcat
    protocol: TCP
    name: tomcat
  - port: 81
    targetPort: vote
    protocol: TCP
    name: vote
  selector:
    app: spider
    tier: frontend
    environment: training
root@eng-app-node:~#

Monday, May 29, 2023

Python lambda map and filter

 >>> names = ['Cat' , 'Dog' , 'Mouse' , 'Orangutan']

>>> list(map(lambda x:x[::-1],names))

['taC', 'goD', 'esuoM', 'natugnarO']

>>>

>>> numbs = [ 1,2,3,4,5,6,7,8]
>>> list(filter(lambda x : x%2 == 0, numbs))
[2, 4, 6, 8]
>>>