0) Verify the status of kubernetes cluster kubectl get nodes # kubectl get pods --all-namespaces # kubectl cluster-info # kubectl config get-contexts
1) download the script from Helm's GitHub repository:
$ cd /tmp $ curl https://raw.githubusercontent.com/kubernetes/helm/master/scripts/get > install-helm.sh
2) Make the script executable $ chmod u+x install-helm.sh
3) #Install helm $ ./install-helm.sh
4) Installing Tiller Tiller is a companion to the helm command that runs on your cluster, receiving commands from helm and communicating directly with the Kubernetes API to do the actual work of creating and deleting resources. To give Tiller the permissions it needs to run on the cluster, we are going to make a Kubernetes serviceaccount resource.
#bind the tiller serviceaccount to the cluster-admin role: $ kubectl create clusterrolebinding tiller --clusterrole cluster-admin --serviceaccount=kube-system:tiller
# Now we can run helm init, which installs Tiller on our cluster, along with some local housekeeping tasks such as downloading the stable repo details: $ helm init --service-account tiller
#To verify that Tiller is running, list the pods in thekube-system namespace: $ kubectl get pods --namespace kube-system
#Now that we've installed both Helm components, we're ready to use helm to install our first application.
5) Installing a Helm Chart
#Use helm to install the kubernetes-dashboard package from the stable repo: $ helm install stable/kubernetes-dashboard --name dashboard-demo
#We can ask Helm for a list of releases on this cluster: $ helm list
# We can now use kubectl to verify that a new service has been deployed on the cluster: $ kubectl get services
#install the parts we need for Kubernetes
$ sudo apt-get install -y kubelet kubectl kubernetes-cni
5)
Kubernetes requires a Pod Network for the pods to communicate. For this guide we will use Flannel although there are several other Pod Networks availabl
#We can now initialize Kubernetes by running the initialization command and passing --pod-network-cidr which is required for Flannel to work correctly
$ sudo kubeadm init --pod-network-cidr=172.168.10.0/24
6)
Once Kubernetes has been initialized we then install the Flannel Pod Network by running.
Let’s deploy the pod network, Pod network is the network through which our cluster nodes will communicate with each other. We will deploy Flannel as our pod network, Flannel will provide the overlay network between cluster nodes.
First we need to set /proc/sys/net/bridge/bridge-nf-call-iptables to 1 to pass bridged IPv4 traffic to iptables` chains which is required by certain CNI networks (in this case Flannel). Do this by issueing
#We can check that the pod is up by running
$ kubectl get pods --all-namespaces
7)
$ sudo kubectl get nodes
8)
Because we are running only a single Kubernetes node we want to be able
to run Pods on the master node. To do this we need to untaint the master
node so it can run regular pods. To do so run
$ kubectl taint nodes --all node-role.kubernetes.io/master-
There are two types of site-packages directories, global and per user.
#Global site-packages: import site site.getsitepackages()
#Global site-packages: python -m site
#Global site-packages: import sys sys.path
#User site-packages: python -m site --user-site
#you can find the user base binary directory by running python -m site --user-base
* Running #pip list or #pip freeze gives you a list of all installed global site-packages. * Running #pip list --user or #pip freeze --user gives you a list of all installed per user site-packages.
There are two types of site-packages directories, global and per user.
#Global site-packages: import site site.getsitepackages()
#Global site-packages: python -m site
#Global site-packages: import sys sys.path
#User site-packages: python -m site --user-site
#you can find the user base binary directory by running python -m site --user-base
* Running #pip list or #pip freeze gives you a list of all installed global site-packages. * Running #pip list --user or #pip freeze --user gives you a list of all installed per user site-packages.
db.media.find({city:/HAD/i}) // Note the 'i' flag for case-insensitivity db.media.find({'city' : {'$regex' : '.*HAD.*', "$options" : "i"}}); // Note the 'i' flag for case-insensitivity
wget http://media.mongodb.org/zips.json
mongoimport --db mediadb --collection media --file zips.json
mongo
use mediadb
show collections
db.media.find().limit(2);
1)
run command to add the keyring: wget -qO - https://download.sublimetext.com/sublimehq-pub.gpg | sudo apt-key add -
2)
Then run command to add the apt repository: echo "deb https://download.sublimetext.com/ apt/stable/" | sudo tee /etc/apt/sources.list.d/sublime-text.list