Last active
January 24, 2020 21:27
-
-
Save vinchi007/7ae93850bd33111f04157b0a4992e1ee to your computer and use it in GitHub Desktop.
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
How to setup SMB/CIFS on PIs to access my NAS | |
install smb client on all pis in your cluster: | |
$ sudo apt install samba samba-common-bin smbclient cifs-utils | |
create credentials file for your NAS access locally on all of your pis | |
$ vi /home/pi/.smbcredentials | |
username=yourusername | |
password=yourpassword | |
create local directory on pis where you will mount your remote NAS mounts | |
$ sudo mkdir /media/Movies/ | |
$ sudo mkdir /media/Cartoons/ | |
$ sudo mkdir /media/Music/ | |
$ sudo mkdir /media/Pictures/ | |
$ sudo mkdir /media/Storage/ | |
$ sudo mkdir /media/TVshows/ | |
Edit your /etc/fstab file and add NAS remove mounts. Notice \040 in the "TV Shows" which is for <space> character to work. | |
$ sudo vi /etc/fstab | |
//NAS.IP/Movies /media/Movies/ cifs credentials=/home/pi/.smbcredentials 0 0 | |
//NAS.IP/Cartoons /media/Cartoons/ cifs credentials=/home/pi/.smbcredentials 0 0 | |
//NAS.IP/Music /media/Music/ cifs credentials=/home/pi/.smbcredentials 0 0 | |
//NAS.IP/Pictures /media/Pictures/ cifs credentials=/home/pi/.smbcredentials 0 0 | |
//NAS.IP/Storage /media/Storage/ cifs credentials=/home/pi/.smbcredentials 0 0 | |
//NAS.IP/TV\040Shows /media/TVshows/ cifs credentials=/home/pi/.smbcredentials 0 0 | |
Now mount all mountpoints in your fstab by running this command: | |
$ sudo mount -a | |
------ | |
How to setup ntpdate on all pis to ensure time is synced: | |
$ for host in node1-pi node2-pi node3-pi node4-pi; do ssh pi@$host sudo apt install ntpdate -y; done | |
How to change tocken expiration for kubernetes-dashboard deployment: | |
edit kubernetes-dashboard Deployment file in terminal (kubectl edit deployment kubernetes-dashboard -n kubernetes-dashboard) or in UI and add the following args to your Container: | |
- --token-ttl=43200 | |
Above setting will change your Dashboard timeout for 12 hours | |
How to list your PODs and access them in the terminal: | |
$ kubectl get pods -n <your namespace> | |
NAME READY STATUS RESTARTS AGE | |
apple-app 1/1 Running 0 56s | |
$ kubectl -n <your namespace> exec -it apple-app -- /bin/bash | |
how to access if you have multiple containers within one pod: | |
$ kubectl -n <your namespace> exec -it apple-app -c <container name> -- /bin/bash |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment