This file contains hidden or 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 | |
| sudo apt-get update | |
| sudo apt install nfs-kernel-server | |
| sudo mkdir -p /data | |
| sudo chown nobody:nogroup /data | |
| sudo chmod 777 /data | |
| # add ip address ranges |
This file contains hidden or 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 | |
| curl -o /usr/local/bin/cfssl https://pkg.cfssl.org/R1.2/cfssl_linux-amd64 | |
| curl -o /usr/local/bin/cfssljson https://pkg.cfssl.org/R1.2/cfssljson_linux-amd64 | |
| chmod +x /usr/local/bin/cfssl* | |
| export PATH=$PATH:/usr/local/bin |
This file contains hidden or 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 | |
| ## Enable IP Forwarding | |
| 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 | |
| ## Disable Swap | |
| swapoff -a |
This file contains hidden or 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 | |
| sudo ufw allow http | |
| sudo ufw allow https | |
| sudo ufw allow 6443/tcp # apiserver | |
| sudo ufw allow 7000/tcp # stats | |
| sudo ufw allow 9101/tcp # metrics exporter | |
| sudo apt-get -y install haproxy | |
| sudo service haproxy restart |
This file contains hidden or 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 # change according to kubeadm supported version | |
| apiServer: | |
| certSANs: | |
| - 127.0.0.1 | |
| - cluster-api.example.com # change according to your requirements | |
| extraArgs: | |
| authorization-mode: Node,RBAC | |
| feature-gates: "TTLAfterFinished=true" |
This file contains hidden or 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 | |
| yum -y update | |
| yum -y install net-tools wget telnet yum-utils device-mapper-persistent-data lvm2 | |
| ### Add Docker repository. | |
| yum-config-manager \ | |
| --add-repo \ | |
| https://download.docker.com/linux/centos/docker-ce.repo -y |
This file contains hidden or 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: extensions/v1beta1 | |
| kind: Deployment | |
| metadata: | |
| name: nfs-busybox | |
| spec: | |
| replicas: 1 | |
| selector: | |
| matchLabels: | |
| name: nfs-busybox | |
| template: |
This file contains hidden or 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: PersistentVolume | |
| metadata: | |
| name: nfs | |
| spec: | |
| capacity: | |
| storage: 10Gi | |
| accessModes: | |
| - ReadWriteMany | |
| nfs: |
This file contains hidden or 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: Service | |
| metadata: | |
| name: nfs-server | |
| spec: | |
| # clusterIP: 10.3.240.20 | |
| ports: | |
| - name: nfs | |
| port: 2049 | |
| - name: mountd |
This file contains hidden or 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: extensions/v1beta1 | |
| kind: Deployment | |
| metadata: | |
| name: nfs-server | |
| spec: | |
| replicas: 1 | |
| selector: | |
| matchLabels: | |
| role: nfs-server | |
| template: |