Skip to main content

Posts

Showing posts with the label kubeadm

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...

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...