Rancher and kubernetes, the very basics
-
Rancher
- most interesting thing to me in the interface is workers->pods
-
Two ways to run stuff
- via yaml
- via kubernetes CLI /
kubectl
-
Via yaml:
- change docker image and pod name
- you can use a command in the yaml syntax run in interactive-ish mode, ignoring the Docker command, to execute stuff inside the running docker image.
- name: podname image: "docker/image" command: - /bin/sh - -c - while true; do echo $(date) >> /tmp/out; sleep 1; done
-
Kubernetes Workloads and Pods | Rancher Manager
- Pods are groups of containrs that share network and storage, usually it’s one container
-
Assigning Pods to Nodes | Kubernetes:
nodeName
is a simple direct waymetadata: name: nginx spec: containers: - name: nginx image: nginx nodeName: kube-01
-
You can set contexts, and then e.g. the same namespace will be applied to all your commands:
k config set-context main --namespace=my-namespace
- (you can also shorten
kubectl
tok
in the CLI)
-
k get pods -o wide -w
returns a detailed overview that is live updated (a lawatch
)
Nel mezzo del deserto posso dire tutto quello che voglio.
comments powered by Disqus