serhii.net

In the middle of the desert you can say anything you want

11 Mar 2023

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 way
      metadata:
        name: nginx
      spec:
        containers:
        - name: nginx
          image: nginx
        nodeName: kube-01 
      
Nel mezzo del deserto posso dire tutto quello che voglio.