Skip to main content

Posts

Showing posts from August, 2021

How to fix Kubernetes CrashLoopBackOff

  How to debug/troubleshoot and fix Kubernetes CrashLoopBackOff? Step 1: run  kubectl describe pod <REPLACE YOUR POD NAME HERE> will give us more information on that pod: kubectl describe pod nginx-5796d5bc7c-xsl6p --namespace nginx-crashloop Name:           nginx-5796d5bc7c-xsl6p Namespace:      nginx-crashloop Node:           ip-10-0-9-132.us-east-2.compute.internal/10.0.9.132 Start Time:     Tue, 11 Aug 2021 19:11:05 +0200 Labels:         app=nginx-crashloop                 name=nginx                 pod-template-hash=1352816737                 role=app Annotations:    kubernetes.io/created-by={"kind":"SerializedReference","apiVersion":"v1","reference":{"kind":"ReplicaSet","namespace":"nginx-crashloop","name":"nginx-5796d5bc7c...

Angular 10: Can't bind to 'ngIf' since it isn't a known property of 'div'

 Error: Angular 10: Can't bind to 'ngIf' since it isn't a known property of 'div' or can't bind to 'ngif' since it isn't a known property of 'ng-container' angular 11 Solutions: Make sure to import CommonModule from the module that is providing your component. for me I had to import CommonMudel in the  TestComponent import { CommonModule } from '@angular/common' ; import { BrowserModule } from '@angular/platform-browser' ; @ NgModule ( { imports : [CommonModule], declarations : [TestComponent] } ) class MyComponentModule {} BrowserModule vs CommonModule BrowserModule provides services that are essential to launch and run a browser app. BrowserModule also re-exports CommonModule from @angular/common, which means that components in the AppModule module also have access to the Angular directives every app needs, such as NgIf and NgFor. CommonModule (all the basics of Angular templating: bindings, *ngI...