Thursday, 30 July 2020

kubectl get nodes NotReady

[root@unicamaster .kube]# kubectl get nodes
NAME          STATUS     ROLES    AGE   VERSION
unicamaster   NotReady   master   3d    v1.18.6
unicanode1    NotReady   <none>   3d    v1.18.6


Turns out I missed out 1 step:



[root@unicamaster .kube]# kubectl describe nodes
Name:               unicamaster
Roles:              master
Labels:             beta.kubernetes.io/arch=amd64
                    beta.kubernetes.io/os=linux
                    kubernetes.io/arch=amd64
                    kubernetes.io/hostname=unicamaster
                    kubernetes.io/os=linux
                    node-role.kubernetes.io/master=
Annotations:        kubeadm.alpha.kubernetes.io/cri-socket: /var/run/dockershim.sock
                    node.alpha.kubernetes.io/ttl: 0
                    volumes.kubernetes.io/controller-managed-attach-detach: true
CreationTimestamp:  Tue, 28 Jul 2020 02:18:54 +0800
Taints:             node-role.kubernetes.io/master:NoSchedule
                    node.kubernetes.io/not-ready:NoSchedule
Unschedulable:      false
Lease:
  HolderIdentity:  unicamaster
  AcquireTime:     <unset>
  RenewTime:       Fri, 31 Jul 2020 02:50:13 +0800
Conditions:
  Type             Status  LastHeartbeatTime                 LastTransitionTime                Reason                       Message
  ----             ------  -----------------                 ------------------                ------                       -------
  MemoryPressure   False   Fri, 31 Jul 2020 02:47:23 +0800   Tue, 28 Jul 2020 02:18:51 +0800   KubeletHasSufficientMemory   kubelet has sufficient memory available
  DiskPressure     False   Fri, 31 Jul 2020 02:47:23 +0800   Wed, 29 Jul 2020 20:08:19 +0800   KubeletHasNoDiskPressure     kubelet has no disk pressure
  PIDPressure      False   Fri, 31 Jul 2020 02:47:23 +0800   Tue, 28 Jul 2020 02:18:51 +0800   KubeletHasSufficientPID      kubelet has sufficient PID available
  Ready            False   Fri, 31 Jul 2020 02:47:23 +0800   Tue, 28 Jul 2020 02:18:51 +0800   KubeletNotReady              runtime network not ready: NetworkReady=false reason:NetworkPluginNotReady message:docker: network plugin is not ready: cni config uninitialized
Addresses:
  InternalIP:  192.168.1.251
  Hostname:    unicamaster
Capacity:
  cpu:                2
  ephemeral-storage:  51175Mi
  hugepages-1Gi:      0
  hugepages-2Mi:      0
  memory:             3880732Ki
  pods:               110
Allocatable:
  cpu:                2
  ephemeral-storage:  48294789041
  hugepages-1Gi:      0
  hugepages-2Mi:      0
  memory:             3778332Ki
  pods:               110
System Info:
  Machine ID:                 c828c2fddf4d4ac69c5857d5f94b6b9e
  System UUID:                AB5F4D56-09B3-77F8-2A11-F58DBA4DC30C
  Boot ID:                    d6b4f643-59f7-4428-be26-036ba6e679af
  Kernel Version:             3.10.0-957.el7.x86_64
  OS Image:                   Red Hat Enterprise Linux
  Operating System:           linux
  Architecture:               amd64
  Container Runtime Version:  docker://1.13.1
  Kubelet Version:            v1.18.6
  Kube-Proxy Version:         v1.18.6
Non-terminated Pods:          (5 in total)
  Namespace                   Name                                   CPU Requests  CPU Limits  Memory Requests  Memory Limits  AGE
  ---------                   ----                                   ------------  ----------  ---------------  -------------  ---
  kube-system                 etcd-unicamaster                       0 (0%)        0 (0%)      0 (0%)           0 (0%)         3d
  kube-system                 kube-apiserver-unicamaster             250m (12%)    0 (0%)      0 (0%)           0 (0%)         3d
  kube-system                 kube-controller-manager-unicamaster    200m (10%)    0 (0%)      0 (0%)           0 (0%)         3d
  kube-system                 kube-proxy-pw8v7                       0 (0%)        0 (0%)      0 (0%)           0 (0%)         3d
  kube-system                 kube-scheduler-unicamaster             100m (5%)     0 (0%)      0 (0%)           0 (0%)         3d
Allocated resources:
  (Total limits may be over 100 percent, i.e., overcommitted.)
  Resource           Requests    Limits
  --------           --------    ------
  cpu                550m (27%)  0 (0%)
  memory             0 (0%)      0 (0%)
  ephemeral-storage  0 (0%)      0 (0%)
  hugepages-1Gi      0 (0%)      0 (0%)
  hugepages-2Mi      0 (0%)      0 (0%)
Events:
  Type    Reason                   Age                  From                     Message
  ----    ------                   ----                 ----                     -------
  Normal  Starting                 5m7s                 kubelet, unicamaster     Starting kubelet.
  Normal  NodeHasSufficientMemory  5m7s                 kubelet, unicamaster     Node unicamaster status is now: NodeHasSufficientMemory
  Normal  NodeHasNoDiskPressure    5m7s                 kubelet, unicamaster     Node unicamaster status is now: NodeHasNoDiskPressure
  Normal  NodeHasSufficientPID     5m7s                 kubelet, unicamaster     Node unicamaster status is now: NodeHasSufficientPID
  Normal  NodeAllocatableEnforced  5m7s                 kubelet, unicamaster     Updated Node Allocatable limit across pods
  Normal  Starting                 3m2s                 kubelet, unicamaster     Starting kubelet.
  Normal  NodeHasSufficientMemory  3m2s (x8 over 3m2s)  kubelet, unicamaster     Node unicamaster status is now: NodeHasSufficientMemory
  Normal  NodeHasNoDiskPressure    3m2s (x8 over 3m2s)  kubelet, unicamaster     Node unicamaster status is now: NodeHasNoDiskPressure
  Normal  NodeHasSufficientPID     3m2s (x7 over 3m2s)  kubelet, unicamaster     Node unicamaster status is now: NodeHasSufficientPID
  Normal  NodeAllocatableEnforced  3m2s                 kubelet, unicamaster     Updated Node Allocatable limit across pods
  Normal  Starting                 2m51s                kube-proxy, unicamaster  Starting kube-proxy.


Name:               unicanode1
Roles:              <none>
Labels:             beta.kubernetes.io/arch=amd64
                    beta.kubernetes.io/os=linux
                    kubernetes.io/arch=amd64
                    kubernetes.io/hostname=unicanode1
                    kubernetes.io/os=linux
Annotations:        kubeadm.alpha.kubernetes.io/cri-socket: /var/run/dockershim.sock
                    node.alpha.kubernetes.io/ttl: 0
                    volumes.kubernetes.io/controller-managed-attach-detach: true
CreationTimestamp:  Tue, 28 Jul 2020 02:41:05 +0800
Taints:             node.kubernetes.io/not-ready:NoSchedule
Unschedulable:      false
Lease:
  HolderIdentity:  unicanode1
  AcquireTime:     <unset>
  RenewTime:       Fri, 31 Jul 2020 02:50:13 +0800
Conditions:
  Type             Status  LastHeartbeatTime                 LastTransitionTime                Reason                       Message
  ----             ------  -----------------                 ------------------                ------                       -------
  MemoryPressure   False   Fri, 31 Jul 2020 02:47:24 +0800   Tue, 28 Jul 2020 02:41:05 +0800   KubeletHasSufficientMemory   kubelet has sufficient memory available
  DiskPressure     False   Fri, 31 Jul 2020 02:47:24 +0800   Tue, 28 Jul 2020 02:41:05 +0800   KubeletHasNoDiskPressure     kubelet has no disk pressure
  PIDPressure      False   Fri, 31 Jul 2020 02:47:24 +0800   Tue, 28 Jul 2020 02:41:05 +0800   KubeletHasSufficientPID      kubelet has sufficient PID available
  Ready            False   Fri, 31 Jul 2020 02:47:24 +0800   Tue, 28 Jul 2020 02:41:05 +0800   KubeletNotReady              runtime network not ready: NetworkReady=false reason:NetworkPluginNotReady message:docker: network plugin is not ready: cni config uninitialized
Addresses:
  InternalIP:  192.168.1.252
  Hostname:    unicanode1
Capacity:
  cpu:                6
  ephemeral-storage:  51175Mi
  hugepages-1Gi:      0
  hugepages-2Mi:      0
  memory:             16266432Ki
  pods:               110
Allocatable:
  cpu:                6
  ephemeral-storage:  48294789041
  hugepages-1Gi:      0
  hugepages-2Mi:      0
  memory:             16164032Ki
  pods:               110
System Info:
  Machine ID:                 2381897a110748d2bfeef753649887bb
  System UUID:                42104D56-81FB-7644-7315-1F0F217AA80B
  Boot ID:                    efd71c95-8e22-42d4-b5b4-24047ee54974
  Kernel Version:             3.10.0-957.el7.x86_64
  OS Image:                   Red Hat Enterprise Linux
  Operating System:           linux
  Architecture:               amd64
  Container Runtime Version:  docker://1.13.1
  Kubelet Version:            v1.18.6
  Kube-Proxy Version:         v1.18.6
Non-terminated Pods:          (1 in total)
  Namespace                   Name                CPU Requests  CPU Limits  Memory Requests  Memory Limits  AGE
  ---------                   ----                ------------  ----------  ---------------  -------------  ---
  kube-system                 kube-proxy-n28xd    0 (0%)        0 (0%)      0 (0%)           0 (0%)         3d
Allocated resources:
  (Total limits may be over 100 percent, i.e., overcommitted.)
  Resource           Requests  Limits
  --------           --------  ------
  cpu                0 (0%)    0 (0%)
  memory             0 (0%)    0 (0%)
  ephemeral-storage  0 (0%)    0 (0%)
  hugepages-1Gi      0 (0%)    0 (0%)
  hugepages-2Mi      0 (0%)    0 (0%)
Events:
  Type    Reason                   Age                   From                    Message
  ----    ------                   ----                  ----                    -------
  Normal  Starting                 4m13s                 kubelet, unicanode1     Starting kubelet.
  Normal  NodeAllocatableEnforced  4m13s                 kubelet, unicanode1     Updated Node Allocatable limit across pods
  Normal  NodeHasSufficientPID     4m7s (x7 over 4m13s)  kubelet, unicanode1     Node unicanode1 status is now: NodeHasSufficientPID
  Normal  NodeHasSufficientMemory  4m (x8 over 4m13s)    kubelet, unicanode1     Node unicanode1 status is now: NodeHasSufficientMemory
  Normal  NodeHasNoDiskPressure    4m (x8 over 4m13s)    kubelet, unicanode1     Node unicanode1 status is now: NodeHasNoDiskPressure
  Normal  Starting                 2m47s                 kube-proxy, unicanode1  Starting kube-proxy.



Have to do this step to install weave:
[root@unicamaster .kube]# export kubever=$(kubectl version | base64 | tr -d '\n')
[root@unicamaster .kube]# kubectl apply -f "https://cloud.weave.works/k8s/net?k8s-version=$kubever"
serviceaccount/weave-net created
clusterrole.rbac.authorization.k8s.io/weave-net created
clusterrolebinding.rbac.authorization.k8s.io/weave-net created
role.rbac.authorization.k8s.io/weave-net created
rolebinding.rbac.authorization.k8s.io/weave-net created
daemonset.apps/weave-net created
[root@unicamaster .kube]# kubectl get nodes
NAME          STATUS     ROLES    AGE   VERSION
unicamaster   NotReady   master   3d    v1.18.6
unicanode1    NotReady   <none>   3d    v1.18.6
[root@unicamaster .kube]# kubectl get nodes
NAME          STATUS     ROLES    AGE   VERSION
unicamaster   NotReady   master   3d    v1.18.6
unicanode1    NotReady   <none>   3d    v1.18.6
[root@unicamaster .kube]# kubectl get nodes
NAME          STATUS   ROLES    AGE   VERSION
unicamaster   Ready    master   3d    v1.18.6
unicanode1    Ready    <none>   3d    v1.18.6


Tuesday, 28 July 2020

Another issue... cannot boot my CentOS after import :-(

This is the error:



Tried this https://www.thegeekdiary.com/centos-rhel-7-how-to-reinstall-grub2-from-rescue-mode/
But it did not work :-(

The specified operating system identifier 'RedHat_64' (id: 80) is not supported on the selected host.

If you get this error when importing:
Warning:
 - The specified operating system identifier 'RedHat_64' (id: 80) is not supported on the selected host. It will be mapped to the following OS identifier: 'Other (32-bit)'.
Error: OVF Package is not supported by target:
 - Line 106: OVF hardware element 'ResourceType' with instance ID '7': No support for the virtual hardware device type '35'.
Warning:
 - The manifest is present but user flag causing to skip it
Completed with errors


Change the ovf:id  & OSType

Example:

    <OperatingSystemSection ovf:id="101">
      <Info>The kind of installed guest operating system</Info>
      <Description>CentOS 7 64-bit</Description>
      <vbox:OSType ovf:required="false">centos7_64Guest</vbox:OSType>
    </OperatingSystemSection>






D:\09.Software\VirtualBox>c:ovftool --disableVerification --skipManifestCheck  --noSSLVerify --datastore="XPG SX8200 PRO" --network="VM Network" Unica-Node1.ovf vi://root@192.168.1.201
Opening OVF source: Unica-Node1.ovf
The manifest does not validate
Enter login information for target vi://192.168.1.201/
Username: root
Password: ********
Opening VI target: vi://root@192.168.1.201:443/
Info:    License agreement for the virtual system
License: The image created only for HCL Software's support team training.
         Contact to Hansraj Mali for more details.
Accept end-user license agreement?
Write 'yes' or 'no' (write 'read' to reread the EULA):
yes
Deploying to VI: vi://root@192.168.1.201:443/
Transfer Completed
Warning:
 - The manifest is present but user flag causing to skip it
Completed successfully