Kubernetes - 2022 sügis: erinevus redaktsioonide vahel

Allikas: Imre kasutab arvutit
Mine navigeerimisribaleMine otsikasti
Resümee puudub
Resümee puudub
142. rida: 142. rida:
"uuid": "a6c62f53-9316-41bb-8242-2d641988e522"
"uuid": "a6c62f53-9316-41bb-8242-2d641988e522"
}
}
</pre>
===Rancher hallatud klastriga suhtlemine kubectl utiliidiga===
Rancher hallatud klastriga töökohaarvutist käsurealt st kubectl utiliidi abil suhtlemiseks tuleb esmalt kopeerida kubectl utiliit
TODO
Seejärel Rancher webgui liidesest kopeerida klastri seadistus
TODO
ja klastri poole pöördumiseks öelda
<pre>
$ /home/imre/kubectl --kubeconfig /home/imre/Downloads/clubu1.yaml get all --all-namespaces -o wide
NAMESPACE            NAME                                              READY  STATUS      RESTARTS      AGE    IP              NODE    NOMINATED NODE  READINESS GATES
cattle-fleet-system  pod/fleet-agent-bfc5655cc-crbl6                    1/1    Running    0            10m    10.42.0.12      clubu1  <none>          <none>
cattle-system        pod/cattle-cluster-agent-674cc68d59-zgrkq          1/1    Running    1 (11m ago)  14m    10.42.0.5        clubu1  <none>          <none>
cattle-system        pod/cattle-node-agent-n56dp                        1/1    Running    0            14m    192.168.110.13  clubu1  <none>          <none>
cattle-system        pod/helm-operation-7vpbz                          0/2    Completed  0            9m36s  10.42.0.13      clubu1  <none>          <none>
...
</pre>
</pre>



Redaktsioon: 30. oktoober 2022, kell 10:59

Sissejuhatus

TODO

Rancher Management Cluster on Docker

Käivitamine

docker run -d --restart=unless-stopped \
  -p 80:80 -p 443:443 \
  --privileged \
  rancher/rancher:latest

kus

  • TODO

Jälgida käivitumist, kulub mitu minutit

root@tf-vm-1:~# docker logs -f practical_mcnulty

Seejärel pöörduda webgui haldusliidese poole, https://192.168.110.11/

Kasulikud lisamaterjalid

Node tekitamine

Node driver - https://github.com/lnxbil/docker-machine-driver-proxmox-ve/releases/download/v4/docker-machine-driver-proxmoxve.linux-amd64

https://github.com/rancher/os/releases aadressilt saab kopeerida

https://github.com/rancher/os/releases/download/v1.5.8/rancheros-proxmoxve-autoformat.iso

Template, defaultist erinevad

  • debugDriver - linnutada
  • debugResty - linnutada
  • provisionStrategy - cdrom
  • proxmoxHost - 192.168.110.250
  • proxmoxNode - pm-kns
  • proxmoxPool - vaiki
  • proxmoxRealm - pam
  • proxmoxUserName - root
  • proxmoxUserPassword - parool
  • sshPassword - tühi (tundub, et toimib rancheos default)
  • sshPort - 22
  • sshUsername - tühi (tundub, et toimib rancheos default)
  • vmCloneFull - 2
  • vmCloneVmid - tühi
  • vmCpu -
  • vmCpuCores - 1
  • vmCpuSockets - 4
  • vmImageFile - local:iso/rancheros-proxmoxve-autoformat.iso
  • vmMemory - 4
  • vmNetBridge - vmbr0
  • vmNetFirewall - 0
  • vmNetModel - virtio
  • vmNetTag - 0
  • vmScsiController - virtio-scsi-pci
  • vmStoragePath - sn_data (tundub, et peab olema proxmox Directory tüüpi)
  • vmStorageSize - 32
  • vmStorageType - QCOW2

ja sama json kujul

{
"annotations": {
"ownerBindingsCreated": "true"
},
"baseType": "nodeTemplate",
"cloudCredentialId": null,
"created": "2022-10-26T22:51:41Z",
"createdTS": 1666824701000,
"creatorId": "user-7rrms",
"driver": "proxmoxve",
"engineEnv": { },
"engineInstallURL": "https://releases.rancher.com/install-docker/20.10.sh",
"engineLabel": { },
"engineOpt": { },
"engineRegistryMirror": [ ],
"id": "cattle-global-nt:nt-d9w8b",
"labels": {
"cattle.io/creator": "norman"
},
"links": {
"nodePools": "…/v3/nodePools?nodeTemplateId=cattle-global-nt%3Ant-d9w8b",
"nodes": "…/v3/nodes?nodeTemplateId=cattle-global-nt%3Ant-d9w8b",
"self": "…/v3/nodeTemplates/cattle-global-nt:nt-d9w8b",
"update": "…/v3/nodeTemplates/cattle-global-nt:nt-d9w8b"
},
"logOpt": { },
"name": "tmplimre",
"principalId": "local://user-7rrms",
"proxmoxveConfig": {
"debugDriver": true,
"debugResty": true,
"provisionStrategy": "cdrom",
"proxmoxHost": "192.168.110.250",
"proxmoxNode": "pm-kns",
"proxmoxPool": "vaiki",
"proxmoxRealm": "pam",
"proxmoxUserName": "root",
"proxmoxUserPassword": "parool",
"sshPassword": "",
"sshPort": "22",
"sshUsername": "",
"vmCienabled": "",
"vmCitype": "",
"vmCloneFull": "2",
"vmCloneVmid": "",
"vmCpu": "",
"vmCpuCores": "1",
"vmCpuSockets": "2",
"vmImageFile": "local:iso/rancheros-proxmoxve-autoformat.iso",
"vmMemory": "2",
"vmNetBridge": "vmbr0",
"vmNetFirewall": "0",
"vmNetModel": "virtio",
"vmNetMtu": "",
"vmNetTag": "0",
"vmNuma": "",
"vmProtection": "",
"vmScsiAttributes": "",
"vmScsiController": "virtio-scsi-pci",
"vmStartOnboot": "",
"vmStoragePath": "sn_data",
"vmStorageSize": "12",
"vmStorageType": "QCOW2",
"vmVmidRange": ""
},
"state": "active",
"storageOpt": { },
"transitioning": "no",
"transitioningMessage": "",
"type": "nodeTemplate",
"useInternalIpAddress": true,
"uuid": "a6c62f53-9316-41bb-8242-2d641988e522"
}

Rancher hallatud klastriga suhtlemine kubectl utiliidiga

Rancher hallatud klastriga töökohaarvutist käsurealt st kubectl utiliidi abil suhtlemiseks tuleb esmalt kopeerida kubectl utiliit

TODO

Seejärel Rancher webgui liidesest kopeerida klastri seadistus

TODO

ja klastri poole pöördumiseks öelda

$ /home/imre/kubectl --kubeconfig /home/imre/Downloads/clubu1.yaml get all --all-namespaces -o wide
NAMESPACE             NAME                                               READY   STATUS      RESTARTS      AGE     IP               NODE     NOMINATED NODE   READINESS GATES
cattle-fleet-system   pod/fleet-agent-bfc5655cc-crbl6                    1/1     Running     0             10m     10.42.0.12       clubu1   <none>           <none>
cattle-system         pod/cattle-cluster-agent-674cc68d59-zgrkq          1/1     Running     1 (11m ago)   14m     10.42.0.5        clubu1   <none>           <none>
cattle-system         pod/cattle-node-agent-n56dp                        1/1     Running     0             14m     192.168.110.13   clubu1   <none>           <none>
cattle-system         pod/helm-operation-7vpbz                           0/2     Completed   0             9m36s   10.42.0.13       clubu1   <none>           <none>

...

Kasulikud lisamaterjalid