kube_context () {
  local context
  context=$(kubectl config current-context 2>/dev/null)
  local docker_glyph=''

  if [[ $? == 0 ]]; then
    context="[${docker_glyph} ${context}]"
  else
    context=""
  fi

  echo "$context"
}

git_branch () {
  local branch
  local git_nerd_glyph=''

  branch="$(git rev-parse --abbrev-ref HEAD 2>/dev/null)"
  
  if [[ $? == 0 ]]; then
    branch="[${git_nerd_glyph} ${branch}]"
  else
    branch=""
  fi

  echo "$branch"
}

export PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w $(kube_context) $(git_branch)\n\$ '

export PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\n\$ '

--- 
+++ 
@@ -1 +1,30 @@
-export PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\n\$ '
+kube_context () {
+  local context
+  context=$(kubectl config current-context 2>/dev/null)
+  local docker_glyph=''
+
+  if [[ $? == 0 ]]; then
+    context="[${docker_glyph} ${context}]"
+  else
+    context=""
+  fi
+
+  echo "$context"
+}
+
+git_branch () {
+  local branch
+  local git_nerd_glyph=''
+
+  branch="$(git rev-parse --abbrev-ref HEAD 2>/dev/null)"
+  
+  if [[ $? == 0 ]]; then
+    branch="[${git_nerd_glyph} ${branch}]"
+  else
+    branch=""
+  fi
+
+  echo "$branch"
+}
+
+export PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w $(kube_context) $(git_branch)\n\$ '
Add kube-context and current branch to prompt
