Outils pour utilisateurs

Outils du site


blog

Pb Kubernetes - K8S - Node status Pending

Voir : https://repost.aws/fr/knowledge-center/eks-resolve-pending-fargate-pods

# kubectl get pods --all-namespaces 
NAMESPACE     NAME                              READY   STATUS             RESTARTS         AGE
kube-system   coredns-6f6b679f8f-bjrwf          0/1     Pending            0                22h
kube-system   coredns-6f6b679f8f-rn9wf          0/1     Pending            0                22h

Ici c'est parce qu'aucun plugin réseau n'a été encore déployé (Cilium, Flannel, Calico, Weave…)

kubectl describe pod coredns-6f6b679f8f-bjrwf 
# journalctl -f -u kubelet.service 
Sep 10 14:52:46 vmdeb01 kubelet[11657]: E0910 14:52:46.562785   11657 kubelet.go:2901] "Container runtime network not ready" networkReady="NetworkReady=false reason:NetworkPluginNotReady message:Network plugin returns error: cni plugin not initialized"
2025/03/24 15:06

Pb Kubernetes - K8S - Node status NotReady

Sur le Master

# kubectl get nodes
NAME   STATUS     ROLES    AGE   VERSION
kub1   Ready      master   40d   v1.17.0
kub2   NotReady   <none>   40d   v1.17.0
kub3   Ready      <none>   40d   v1.17.0

# kubectl describe node kub2
  Type             Status    LastHeartbeatTime                 LastTransitionTime                Reason              Message
  ----             ------    -----------------                 ------------------                ------              -------
  MemoryPressure   Unknown   Mon, 13 Jan 2020 14:05:22 +0100   Mon, 13 Jan 2020 14:09:07 +0100   NodeStatusUnknown   Kubelet stopped posting node status.
  DiskPressure     Unknown   Mon, 13 Jan 2020 14:05:22 +0100   Mon, 13 Jan 2020 14:09:07 +0100   NodeStatusUnknown   Kubelet stopped posting node status.
  PIDPressure      Unknown   Mon, 13 Jan 2020 14:05:22 +0100   Mon, 13 Jan 2020 14:09:07 +0100   NodeStatusUnknown   Kubelet stopped posting node status.
  Ready            Unknown   Mon, 13 Jan 2020 14:05:22 +0100   Mon, 13 Jan 2020 14:09:07 +0100   NodeStatusUnknown   Kubelet stopped posting node status.

Sur le Worker

root@kub2:~# systemctl status kubelet.service

root@kub2:~# journalctl -f -u kubelet.service
Jan 29 18:51:17 kub2 systemd[1]: Stopped kubelet: The Kubernetes Node Agent.
Jan 29 18:51:17 kub2 systemd[1]: Started kubelet: The Kubernetes Node Agent.
Jan 29 18:51:17 kub2 kubelet[15311]: F0129 18:51:17.486785   15311 server.go:198] failed to load Kubelet config file /var/lib/kubelet/config.yaml, error failed to read kubelet config file "/var/lib/kubelet/config.yaml", error: open /var/lib/kubelet/config.yaml: no such file or directory
Jan 29 18:51:17 kub2 systemd[1]: kubelet.service: Main process exited, code=exited, status=255/EXCEPTION
Jan 29 18:51:17 kub2 systemd[1]: kubelet.service: Failed with result 'exit-code'

Solution

Sur le Master

root@kub1:~# kubeadm token create --print-join-command
W0129 18:57:42.419029    4660 validation.go:28] Cannot validate kube-proxy config - no validator is available
W0129 18:57:42.419636    4660 validation.go:28] Cannot validate kubelet config - no validator is available
kubeadm join 192.168.56.21:6443 --token 2sfx5v.yjb8tsilc19u43rm     --discovery-token-ca-cert-hash sha256:f84fd4960fc7844182510b8daea9eb6739af2075f79edd726b3facfc1285e291

Sur le Worker

kubeadm join 192.168.56.21:6443 --token 2sfx5v.yjb8tsilc19u43rm     --discovery-token-ca-cert-hash sha256:f84fd4960fc7844182510b8daea9eb6739af2075f79edd726b3facfc1285e291
2025/03/24 15:06
,

Brouillon Pb ksplice mise a jour kernel à chaud

Ça n'a pas marché sur ma Debian

Voir :

Voir aussi :

  • kexec-tools.
    • kexec est une fonctionnalité du noyau Linux qui permet de charger un noyau Linux (le même ou une version différente) et de redémarrer le système directement dessus sans avoir besoin de redémarrer complètement la machine.
$ uname -a
Linux portable 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt11-1+deb8u6 (2015-11-09) x86_64 GNU/Linux
apt-get install linux-source-3.16 
apt-get install ksplice
mkdir src
cd src
tar xf /usr/src/linux-source-3.16.tar.xz
mkdir linux-source-3.16/ksplice
cp /boot/System.map-3.16.0-4-amd64 linux-source-3.16/ksplice/System.map
cp /boot/config-3.16.0-4-amd64 linux-source-3.16/.config
$ export CONCURRENCY_LEVEL=4
$ ksplice-create --diffext=new linux-source-3.16/
cc1: some warnings being treated as errors
scripts/Makefile.build:257: recipe for target '/tmp/ksplice-tmp-G_Ex2i/kmodsrc/ksplice.o' failed
make[1]: *** [/tmp/ksplice-tmp-G_Ex2i/kmodsrc/ksplice.o] Error 1
Makefile:1352: recipe for target '_module_/tmp/ksplice-tmp-G_Ex2i/kmodsrc' failed
make: *** [_module_/tmp/ksplice-tmp-G_Ex2i/kmodsrc] Error 2
make: Leaving directory '/home/jean/src/linux-3.16/linux-source-3.16'
Child exited with status 2
Failed during: make -rR -j4 -C /home/jean/src/linux-3.16/linux-source-3.16 M=/tmp/ksplice-tmp-G_Ex2i/kmodsrc KSPLICE_KID=nn7ysgvd KSPLICE_VE
2025/03/24 15:06

Cloud - Terrafom / OpenTofu

Notes

Terraform n'est plus un Logiciel Libre. Le Fork libre s'appelle OpenTofu

Install

snap install --classic opentofu
terraform fmt
terraform validate
terraform plan -out plan01
terraform apply "plan01"

Pb

EBS volumes destroyed & recreated - Keep EBS without create new topology ?
Erreur : VPCIdNotSpecified: No default VPC for this user status code: 40

example.tf

provider "aws" {
  profile    = "default"
  region     = "eu-west-1"
}

resource "aws_instance" "example" {
  ami           = "ami-01b282b0f06ba5fd2"
  instance_type = "t2.micro"
  tags = {
    Name = "Test-JBL-tf1"
  }

}
terraform apply

Erreur

Error: Error launching source instance: VPCIdNotSpecified: No default VPC for this user
        status code: 400, request id: c83af246-9715-4d82-a47d-d08a7941c7f6
Solution

example.tf

provider "aws" {
  profile    = "default"
  region     = "eu-west-1"
}

resource "aws_instance" "example" {
  ami           = "ami-01b282b0f06ba5f32"
  instance_type = "t2.micro"
  vpc_security_group_ids = ["sg-08bc01c0ececbc84f"]
  subnet_id     = "subnet-0d63fcd2f893bbb5b"
  tags = {
    Name = "par-web-01"
  }

}
Erreur : No suitable endpoint could be found in the service
terraform apply
│ Error: Error creating OpenStack compute client: No suitable endpoint could be found in the service catalog.
│ 
│   with openstack_compute_keypair_v2.test_keypair,
│   on 10_test.tf line 2, in resource "openstack_compute_keypair_v2" "test_keypair":
│    2: resource "openstack_compute_keypair_v2" "test_keypair" {

Lister le catalogue ici

openstack catalog list

Mettre la région appropriée

Autres

SFTP TO S3 - AWS Storage Gateway

Voir :


resource "aws_storagegateway_gateway" "example" {
  #gateway_ip_address = "1.2.3.4"
  #activation_key     = ""
  gateway_name       = "example"
  gateway_timezone   = "GMT"
  gateway_type       = "FILE_S3"
  smb_guest_password = "pass"
}

resource "aws_storagegateway_smb_file_share" "example" {
  authentication = "GuestAccess"
  gateway_arn    = "${aws_storagegateway_gateway.example.arn}"
  location_arn   = "${aws_s3_bucket.example.arn}"
  role_arn       = "${aws_iam_role.example.arn}"
}

Autres

~/.terraforrc

export TF_LOG=1
terraform plan ${VARS} -out="./${ENV}.tfplan" -input=false
terraform apply -input=false ${ENV}.tfplan
2025/03/24 15:06

Pb isolinux.bin missing or corrupt sur Dell PowerEdge 1950

Pb

Isolinux.bin missing or corrupt

Solution

Allez dans le BIOS.

Changer USB Flash Drive Emulation Type et passer de auto à hard drive

Après pour le boot, la clef USB n'est plus affichée dans le menu. La clef USB est à présent considérée comme un disque dur (/dev/sdb dans mon cas)

Pour booter sur la clef USB :

F11 Boot Menu\ puis Hard Drive C:\ et Front USB

2025/03/24 15:06
blog.txt · Dernière modification : de 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki