Kubernetes

Kubernetes cluster

If you don’t want to setup the cluster, you can spent some time to explore with exiting online setup. Interactive Tutorial Lets you try out Kubernetes right out of your web browser, using a virtual terminal Kubernetes Interactive Tutorial.. Kubernetes Playground Gives you playgroun in web browser Kubernetes Playground. Minikube you can run Kubernetes locally for development and test purpose Minikube. Using Virutalbox & vagarnt we can setup the small cluster in our laptop/desktop machine. »

httpbin application deployment

Installing httpbin application Below yaml will create and deployment. kubectl create -f https://github.com/istio/istio/raw/master/samples/httpbin/httpbin.yaml Ingress Yaml file. apiVersion: extensions/v1beta1 kind: Ingress metadata: name: httpbin-web-server namespace: default spec: rules: - host: httpbin.sfgroups.com http: paths: - path: "/" backend: serviceName: httpbin servicePort: 8000[ Submit the request to httpbin application curl --resolve httpbin.sfgroups.com:30912:192.168.16.211 http://httpbin.sfgroups.com:30912//get?show_env=1 Output { "args": { "show_env": "1" }, "headers": { "Accept": "*/*", "Connection": "close", "Host": "httpbin.sfgroups.com:30912", "User-Agent": "curl/7.29.0", "X-Forwarded-For": "10. »

Kubeadm cluster creation

Kubernetes project created the kubeadm tools to setup the cluster. As for now this tool in beta status. But kubeadm is good tool to setup the experimental cluster. Install Kubeadm on your nodes Configure Cluster using kubeadm add the repo install the required rpms. cat <<EOF > /etc/yum.repos.d/kubernetes.repo [kubernetes] name=Kubernetes baseurl=http://yum.kubernetes.io/repos/kubernetes-el7-x86_64 enabled=1 gpgcheck=1 repo_gpgcheck=1 gpgkey=https://packages.cloud.google.com/yum/doc/yum-key.gpg https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg EOF Remove and install the package yum install epel-release yum makecache fast yum remove -y kubelet kubectl kubernetes-cni kubeadm yum install -y kubelet kubectl kubernetes-cni kubeadm Init the master nodes kubeadm init --pod-network-cidr=10. »

kubectl bash alias

Below kubectl shortcut will same some time in typing. ## add these alias in your .bashrc script. alias a='alias' alias k='kubectl ' alias ka='kubectl apply -f ' alias kg='kubectl get ' alias kgn='kubectl get nodes' alias kgnw='kubectl get nodes -o wide' alias kgnl='kubectl get nodes --show-labels' alias kgp='kubectl get pods' alias kgs='kubectl get svc' alias kgd='kubectl get deployments' alias kcf='kubectl create -f ' alias kd='kubectl delete ' alias kdf='kubectl delete -f ' alias kaf='kubectl apply -f ' alias kgpa='kubectl get pods --all-namespaces' Then you can use kgn it will display node status. »


Copyright © 2004, Software Groups