• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

Kubernetes

kubectl: command not found

by admin

The Kubernetes command-line tool, kubectl is used to run commands against Kubernetes clusters. You’ll use kubectl to inspect and manage your service’s cluster resources and view logs. Some commonly used commands for retrieving information about a Kubernetes cluster are as follows: kubectl get shows information about the specified API object. kubectl describe gives more detail […]

Filed Under: DevOps, Kubernetes, Linux

Kubernetes Command Line Reference (Cheatsheet)

by admin

Creating Objects Create resource: $ kubectl apply -f ./<file_name>.yaml Create from multiple files: $ kubectl apply -f ./<file_name_1>.yaml -f ./<file_name_2>.yaml Create all files in directory: $ kubectl apply -f ./<directory_name> Create from url: $ kubectl apply -f https://<url> Create pod: $ kubectl run <pod_name> –image <image_name> Create pod, then expose it as service: $ kubectl […]

Filed Under: DevOps, Kubernetes

“Error: Could Not Find A Ready Tiller Pod” – helm error

by admin

The Problem Getting “Error: could not find a ready tiller pod” error when trying various helm commands. > helm version Client: &version.Version{SemVer:”v2.14.3″, GitCommit:”0e7f3b6637f7af8fcfddb3d2941fcc7cbebb0085″, GitTreeState:”clean”} Error: could not find a ready tiller pod The Solution This error is caused due to wrong configuration or version mismatch. Follow the procedure to install helm and tiller using the […]

Filed Under: DevOps, Kubernetes

How to schedule master node running pod/service as worker node

by admin

Question: How to Schedule Master Node to Run Pod Workloads Like the Worker Node? By default, only the worker node can run the pod workloads and the master is only responsible for the scheduling and configuration. $ kubectl get nodes -o json | jq .items[].spec.taints [ { “effect”: “NoSchedule”, “key”: “node-role.kubernetes.io/master” } ] $ kubectl […]

Filed Under: DevOps, Kubernetes

How To Access Kubernetes Dashboard Externally

by admin

Following is an alternative workaround to access Dashboard externally. 1. kubernetes-dashboard is a service file which provides dash-board functionality, to edit this we need to edit dashboard service and change service “type” from ClusterIP to NodePort: [root@kubeXXXX]# kubectl -n kube-system edit service kubernetes-dashboard # Please edit the object below. Lines beginning with a ‘#’ will […]

Filed Under: DevOps, Kubernetes

New User Failed Run Kubectl with Error “The connection to the server xxx.xxx.xxx was refused – did you specify the right host or port?”

by admin

The Problem When run kubectl from a new created user, failed with error: The connection to the server xxx.xxx.xxx was refused – did you specify the right host or port? The Solution A newly created user has no KUBECONFIG configured. Setup kubernetes configuration for the new user: # mkdir -p $HOME/.kube # sudo cp -i […]

Filed Under: DevOps, Kubernetes

How to schedule master node running pod/service as a worker node

by admin

Question: How can I schedule master node running pod/service as worker node? By deafult, only worker node could run the pod, master only response for the scheduler/configuration. $ kubectl get nodes -o json | jq .items[].spec.taints [ { “effect”: “NoSchedule”, “key”: “node-role.kubernetes.io/master” } ] $ kubectl get nodes -o json | grep master “node-role.kubernetes.io/master”: “” […]

Filed Under: DevOps, Kubernetes

Endpoint is not Created for Service in Kubernetes

by admin

The Problem Endpoints shows ‘none’: $ kubectl get svc NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE kubernetes ClusterIP 10.yy.0.1 <none> 443/TCP 9d test ClusterIP 10.xx.97.97 <none> 6379/TCP 21s $ kubectl describe svc test Name: test Namespace: default Labels: <none> Annotations: kubectl.kubernetes.io/last-applied-configuration: {“apiVersion”:”v1″,”kind”:”Service”,”metadata”:{“annotations”:{},”name”:”test”,”namespace”:”default”},”spec”:{“clusterIP”:”10.xx.97.97″,”… Selector: app=test Type: ClusterIP IP: 10.xx.97.97 Port: <unset> 6379/TCP TargetPort: 6379/TCP Endpoints: <none> Session […]

Filed Under: DevOps, Kubernetes

Troubleshooting kubectl Error: The connection to the server x.x.x.x:6443 was refused – did you specify the right host or port?

by admin

This document describes steps to troubleshoot kubectl error: The connection to the server x.x.x.x:6443 was refused – did you specify the right host or port? 1. The kubectl should be executed on the Master Node. 2. Current user must have Kubernetes cluster configuration environment variable (Details of how to are listed under section Preparing to […]

Filed Under: DevOps, Kubernetes

Primary Sidebar

Recent Posts

  • ncat Command Examples in Linux
  • ncat: command not found
  • nautilus Command Examples in Linux
  • namei: command not found

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright