SSH connections inside kOps

image.png

SSH connections are needed in order to setup the initial configurations for the vms in order to support kubernetes.

Appunti

Usa cloudimage per immagini vm elemento

image.png

setta password cloud init: virt-customize -a bionic-server-cloudimg-amd64.img --root-password password:ubuntu

user: root

password: ubuntu

Command of kops execution

S3_REGION=eu-south-1 S3_ENDPOINT=https://s3.eu-south-1.wasabisys.com S3_ACCESS_KEY_ID=GPDPCSW1IWY7I55O4X0V S3_SECRET_ACCESS_KEY=czXmW7BBTQsbzoEDsNdotEn998QJgpTie9daF7Bl PROVIDER=elemento dlv --listen=:2345 --headless=true --api-version=2 exec ${GOPATH}/bin/kops -- create cluster --cloud=elemento --name=test3.k8s --state=s3://test-kops --kubernetes-version=1.32.4 --zones=europe --node-count=3 --network-cidr 10.0.0.0/24 --v=10 

Okay this command now works correctly, continue with the update command:

Kops update cluster - kOps - Kubernetes Operations

S3_REGION=eu-south-1 S3_ENDPOINT=https://s3.eu-south-1.wasabisys.com S3_ACCESS_KEY_ID=GPDPCSW1IWY7I55O4X0V S3_SECRET_ACCESS_KEY=czXmW7BBTQsbzoEDsNdotEn998QJgpTie9daF7Bl PROVIDER=elemento dlv --listen=:2345 --headless=true --api-version=2 exec ${GOPATH}/bin/kops -- update cluster test.k8s --yes --admin --state=s3://test-kops --v=10
OR
kops update cluster test.k8s --yes --admin --state=s3://test-kops --ignore-kubelet-version-skew --v=10

Other commands used

kops export kubeconfig --name=test16.k8s --state=s3://test-kops
kops create keypair kubernetes-ca --name=test16.k8s --primary
kops update cluster test.k8s --yes --admin --state=s3://test-kops --v=10
kops validate cluster --name=test16.k8s --state=s3://test-kops --v=10

<aside> 💡

Quando cito del testo da una fonte posso prenderlo esattamente come è o devo modificarlo? o citi tra virgolette o rielabori in testo

</aside>

CloudInit on VMs

user: root

password: ubuntu