Switch branches/tags
Nothing to show
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
..
Failed to load latest commit information.
README.org
cheatsheet-rancher-A4.pdf
rancher-architecture.png

README.org

1 Rancher CheatSheet

linkedin
github
slack


PRs Welcome

File me Issues or star this repo.

1.1 Rancher Summary

NameCommand
Setup rancher in vagrantGitHub: quickstart/vagrant, https://172.22.101.101/ admin/admin
Start rancher control plane with containerdocker run -d -p 80:80 -p 443:443 rancher/rancher
ReferenceRancher v2.0 Documentation, Rancher Slack, Rancher Forum
ReferenceYouTube: Rancher Overview, YouTube: Setup Rancher In A Hard Way
ReferenceOpenShift CheatSheet, Rancher CheatSheet, PKS CheatSheet

https://raw.githubusercontent.com/dennyzhang/cheatsheet.dennyzhang.com/master/cheatsheet-rancher-A4/rancher-architecture.png

1.2 Rancher Components

NameCommand
Control plane - rancherComplete container management platform
cliRancher CLI
VM distro - osTiny Linux distro that runs the entire OS as Docker containers
Storage - longhornDistributed block storage for Kubernetes

1.3 rancher Concepts

NameCommand
Node driver
Node template

1.4 rancher Command Line

NameCommand
ReferenceLink: Rancher CLI
Login to clusterrancher login https://<SERVER_URL> --token <BEARER_TOKEN>
Select projectrancher context switch
Rancher ssh to vmrancher ssh node-001
Run kubectl commandrancher kubectl get nodes

1.5 Rancher Source Code

NameCommand
Rancher API LayerGitHub: rancher/norman
Rancher Kubernetes EngineGitHub: rancher/rke, GitHub: rancher/kontainer-engine

1.6 Rancher Footprint

> kubectl get all --all-namespaces
NAMESPACE       NAME                                          READY     STATUS      RESTARTS   AGE
cattle-system   pod/cattle-cluster-agent-55897c6cb-xdj96      1/1       Running     0          6m
cattle-system   pod/cattle-node-agent-89jgs                   1/1       Running     0          6m
ingress-nginx   pod/default-http-backend-797c5bc547-669zf     1/1       Running     0          6m
ingress-nginx   pod/nginx-ingress-controller-4gdhf            1/1       Running     0          6m
kube-system     pod/kube-dns-7588d5b5f5-xpfmg                 3/3       Running     0          6m
kube-system     pod/kube-dns-autoscaler-5db9bbb766-kdhdn      1/1       Running     0          6m
kube-system     pod/kube-flannel-x686d                        2/2       Running     0          6m
kube-system     pod/metrics-server-97bc649d5-8pf7f            1/1       Running     0          6m
kube-system     pod/rke-ingress-controller-deploy-job-7wn5h   0/1       Completed   0          6m
kube-system     pod/rke-kubedns-addon-deploy-job-2pzw6        0/1       Completed   0          6m
kube-system     pod/rke-metrics-addon-deploy-job-69zxc        0/1       Completed   0          6m
kube-system     pod/rke-network-plugin-deploy-job-bv4jc       0/1       Completed   0          6m

NAMESPACE       NAME                           TYPE        CLUSTER-IP      EXTERNAL-IP   PORT(S)         AGE
default         service/kubernetes             ClusterIP   10.43.0.1       <none>        443/TCP         7m
ingress-nginx   service/default-http-backend   ClusterIP   10.43.142.185   <none>        80/TCP          6m
kube-system     service/kube-dns               ClusterIP   10.43.0.10      <none>        53/UDP,53/TCP   6m
kube-system     service/metrics-server         ClusterIP   10.43.20.15     <none>        443/TCP         6m

NAMESPACE       NAME                                      DESIRED   CURRENT   READY     UP-TO-DATE   AVAILABLE   NODE SELECTOR   AGE
cattle-system   daemonset.apps/cattle-node-agent          1         1         1         1            1           <none>          6m
ingress-nginx   daemonset.apps/nginx-ingress-controller   1         1         1         1            1           <none>          6m
kube-system     daemonset.apps/kube-flannel               1         1         1         1            1           <none>          6m

NAMESPACE       NAME                                   DESIRED   CURRENT   UP-TO-DATE   AVAILABLE   AGE
cattle-system   deployment.apps/cattle-cluster-agent   1         1         1            1           6m
ingress-nginx   deployment.apps/default-http-backend   1         1         1            1           6m
kube-system     deployment.apps/kube-dns               1         1         1            1           6m
kube-system     deployment.apps/kube-dns-autoscaler    1         1         1            1           6m
kube-system     deployment.apps/metrics-server         1         1         1            1           6m

NAMESPACE       NAME                                              DESIRED   CURRENT   READY     AGE
cattle-system   replicaset.apps/cattle-cluster-agent-55897c6cb    1         1         1         6m
ingress-nginx   replicaset.apps/default-http-backend-797c5bc547   1         1         1         6m
kube-system     replicaset.apps/kube-dns-7588d5b5f5               1         1         1         6m
kube-system     replicaset.apps/kube-dns-autoscaler-5db9bbb766    1         1         1         6m
kube-system     replicaset.apps/metrics-server-97bc649d5          1         1         1         6m

NAMESPACE     NAME                                          DESIRED   SUCCESSFUL   AGE
kube-system   job.batch/rke-ingress-controller-deploy-job   1         1            6m
kube-system   job.batch/rke-kubedns-addon-deploy-job        1         1            6m
kube-system   job.batch/rke-metrics-addon-deploy-job        1         1            6m
kube-system   job.batch/rke-network-plugin-deploy-job       1         1            6m

1.7 Rancher CLI Help

Denny > ./rancher --help
Rancher CLI, managing containers one UTF-8 character at a time

Usage: rancher [OPTIONS] COMMAND [arg...]

Version: v2.0.5

Options:
  --debug        Debug logging
  --help, -h     show help
  --version, -v  print the version

Commands:
  apps, [app]              Operations with apps
  catalog                  Operations with catalogs
  clusters, [cluster]      Operations on clusters
  context                  Operations for the context
  inspect                  View details of resources
  kubectl                  Run kubectl commands
  login, [l]               Login to a Rancher server
  namespaces, [namespace]  Operations on namespaces
  nodes, [node]            Operations on nodes
  projects, [project]      Operations on projects
  ps                       Show workloads in a project
  settings, [setting]      Show settings for the current server
  ssh                      SSH into a node
  up                       apply compose config
  help, [h]                Shows a list of commands or help for one command

Run 'rancher COMMAND --help' for more information on a command.

1.8 More Resources

https://rancher.com/docs/rancher/v2.x/en/quick-start-guide/deployment/

License: Code is licensed under MIT License.

linkedin github slack