Skip to main content

Posts

Showing posts with the label kubernetes

Helm issues

Helm install pod in pending state: When you execute kubectl get events you will see the following error: no persistent volumes available for this claim and no storage class is set or PersistentVolumeClaim is not bound This error usually comes in kubernetes set with kubeadm. You will need to create persistentvolume with the following yaml file: [code] kind: PersistentVolume apiVersion: v1 metadata: name: redis-data labels: type: local spec: storageClassName: generic capacity: storage: 8Gi accessModes: - ReadWriteOnce hostPath: path: "/bitnami/redis" [/code] create pv with kubectl create -f pv-create.yml Then you will need to create pvc with following yaml [code] kind: PersistentVolumeClaim apiVersion: v1 metadata: name: redis-data spec: storageClassName: generic accessModes: - ReadWriteOnce resources: requests: storage: 8Gi [/code] You will need to create pvc with kubectl create -f pv-claim.yml Check the pvc status with kube...

Installing Kubernetes 1.8.1 on centos 7 with flannel

Prerequisites :- You should have at least two VMs (1 master and 1 slave) with you before creating cluster in order to test full functionality of k8s. 1] Master :- Minimum of 1 Gb RAM, 1 CPU core and 50 Gb HDD     ( suggested ) 2] Slave :- Minimum of 1 Gb RAM, 1 CPU core and 50 Gb HDD     ( suggested ) 3] Also, make sure of following things. Network interconnectivity between VMs. hostnames Prefer to give Static IP. DNS entries Disable SELinux $ vi /etc/selinux/config Disable and stop firewall. ( If you are not familiar with firewall ) $ systemctl stop firewalld $ systemctl disable firewalld Following steps creates k8s cluster on the above VMs using kubeadm on centos 7. Step 1] Installing kubelet and kubeadm on all your hosts $ ARCH=x86_64 $ cat <<EOF > /etc/yum.repos.d/kubernetes.repo [kubernetes] name=Kubernetes baseurl=https://packages.cloud.google.com/yum/repos/kubernetes-el7-${ARCH} enabled=1 gpgcheck=1 repo_gpgcheck=1 gpgkey=https://packages.cloud.google.com/yu...

Helm: Installation and Configuration

PREREQUISITES You must have Kubernetes installed. We recommend version 1.4.1 or later. You should also have a local configured copy of  kubectl . Helm will figure out where to install Tiller by reading your Kubernetes configuration file (usually  $HOME/.kube/config ). This is the same file that  kubectl  uses. To find out which cluster Tiller would install to, you can run  kubectl config current-context or  kubectl cluster-info . $ kubectl config current-context my-cluster INSTALL HELM Download a binary release of the Helm client. You can use tools like  homebrew , or look at  the official releases page . For more details, or for other options, see  the installation guide . INITIALIZE HELM AND INSTALL TILLER Once you have Helm ready, you can initialize the local CLI and also install Tiller into your Kubernetes cluster in one step: $ helm init This will install Tiller into the Kubernetes cluster you saw with  kubectl config current-context . TIP:  Want to install into a different cl...

Install kubernetes on Centos/RHEL 7

Kubernetes is a  cluster  and  orchestration  engine for docker containers. In other words Kubernetes is  an open source software or tool which is used to orchestrate and manage docker containers in cluster environment. Kubernetes is also known as k8s and it was developed by Google and donated to “Cloud Native Computing foundation” In Kubernetes setup we have one master node and multiple nodes. Cluster nodes is known as worker node or Minion. From the master node we manage the cluster and its nodes using ‘ kubeadm ‘ and ‘ kubectl ‘  command. Kubernetes can be installed and deployed using following methods: Minikube ( It is a single node kubernetes cluster) Kops ( Multi node kubernetes setup into AWS ) Kubeadm ( Multi Node Cluster in our own premises) In this article we will install latest version of Kubernetes 1.7 on CentOS 7 / RHEL 7 with kubeadm utility. In my setup I am taking three CentOS 7 servers with minimal installation. One server will acts master node and rest two serve...

Installing Kubernetes on your Windows with Minikube

Personally I think if you are looking for a container management solution in today’s world, you have to invest your time in  Kubernetes  (k8s). There is no doubt about that because of multiple factors. To the best of my undestanding, these points include: Kubernetes is  Open Source Great momentum in terms of activities & contribution at its  Open Source Project Decades of experience running its  predecessor  at Google Support of multiple OS and infrastructure software vendors Rate at which features are being released Production readiness (Damn it,  Pokemon Go  met its scale due to Kubernetes) Number of features available. Check out the list of features at the  home page . The general perception about a management solution like Kubernetes is that it would require quite a bit of setup for you to try it out locally. What this means is that it would take some time to set it up but more than setting it up, you might probably get access to it only during staging phase or so...