This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
01.File Hierarchy | |
1.fileHieracy | |
Angular Js Part | |
1. Angular Module - angularModule.js | |
'use strict'; | |
const app = angular.module("movieTicketOnline", ["ngRoute"]); | |
2. Angular Controller - controller.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
## Generic installation on all nodes | |
sysctl -w net.ipv4.ip_forward=1 | |
sed -i 's/#net.ipv4.ip_forward=1/net.ipv4.ip_forward=1/g' /etc/sysctl.conf | |
sudo sysctl -p /etc/sysctl.conf | |
swapoff -a | |
sed -i '2s/^/#/' /etc/fstab |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: kubeadm.k8s.io/v1beta1 | |
kind: ClusterConfiguration #you will need to ensure they match the version of the Kubernetes control plane of kubectl and kubeadm | |
kubernetesVersion: v1.14.3 | |
apiServer: | |
certSANs: #Additional hostnames or IP addresses that should be added to the Subject Alternate Name section for the certificate that the API Server will use. If you expose the API Server through a load balancer and public DNS you could specify this with | |
- 127.0.0.1 | |
- 157.180.200.132 | |
- do-dev-master.sarasa-dev.com | |
extraArgs: # Add this section if you have setup default audit policy. if not, dont add this section | |
authorization-mode: Node,RBAC |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: kubeadm.k8s.io/v1beta1 | |
kind: ClusterConfiguration | |
kubernetesVersion: v1.14.3 | |
apiServer: | |
certSANs: | |
- "do-dev-master.sarasa-dev.com" | |
controlPlaneEndpoint: "" | |
networking: | |
podSubnet: 10.244.0.0/16 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
kind: Pod | |
metadata: | |
creationTimestamp: null | |
labels: | |
run: nginx | |
name: nginx | |
spec: | |
containers: | |
- image: nginx |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Docker Swarm | Kubernetes | |
---|---|---|
Developed by Docker Swarm | Developed by Google | |
Has a smaller community compared to Kubernetes | Has a vast Open source community | |
Has low fault tolerance | Has high fault tolerance | |
Easy to set up and fits well into Docker ecosystem | Requires heavy setup | |
Less extensive and less customizable | More extensive and customizable | |
Features automated internal load balancing through any node in the cluster | Enables load balancing when container pods are defined as services | |
Facilitates for quick container deployment and scaling even in very large clusters | Provides strong guarantees to cluster states at the expense of speed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Sarasa Gunawardhana | |
version: "3.2" | |
services: | |
database: | |
image: mongodb:latest | |
environment: | |
- MONGO_DATA_DIR=/data/db | |
- MONGO_LOG_DIR=/dev/null | |
volumes: | |
- /data/db:/data/db |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
kind: Pod | |
metadata: | |
creationTimestamp: null | |
labels: | |
run: nginx-01 | |
name: nginx-01 | |
spec: | |
containers: | |
- image: nginx |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
creationTimestamp: null | |
labels: | |
run: nginx | |
name: nginx | |
spec: | |
replicas: 3 | |
selector: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
creationTimestamp: null | |
labels: | |
run: my-service-1 | |
name: my-service-1 | |
spec: | |
replicas: 1 | |
selector: |
OlderNewer