Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Brillian tutorial ! Thanks for this :D !
For anyone following the tutorial, some items were missing I feel ? In case you run into issues, locally I’ve made the following adjustments base on the official kubeadm docs (https://kubernetes.io/docs/setup/independent/install-kubeadm/):
initial.yml should also include an SSH restart near the end:
- name: 'Restart SSH daemon'
service:
name: sshd
state: restarted
dependencies.yml : locally I moved the ‘apt-transport-https’ to before the docker.io install:
- name: 'Install docker and role dependencies'
become: yes
apt:
name: "{{item}}"
state: present
install_recommends: false
with_items:
- "apt-transport-https"
- "ca-certificates"
- "software-properties-common"
- "cron"
master.yml : Should include a check for cgroup drivers and should also reload system daemon and restart kubelet service before initializing the kubeadm:
- name: 'Configure cgroup driver used by kubelet on Master node'
become: yes
replace:
path: /etc/systemd/system/kubelet.service.d/10-kubeadm.conf
regexp: 'cgroup-driver=systemd'
replace: 'cgroup-driver="cgroupfs"'
backup: yes
- name: 'Reload configs and restart kubelet'
become: yes
systemd:
state: restarted
daemon_reload: yes
name: kubelet
Those are the changes I’ve made locally :), nice tutorial guys!
There is also an issue in the master.yml file. The shell command for the join pod network should pipe to a different output file to make sure ansible doesn’t rerun this :
kubectl apply -f https://raw.githubusercontent.com/coreos/flannel/v0.9.1/Documentation/kube-flannel.yml >> pod_network_setup_complete.txt
should be
kubectl apply -f https://raw.githubusercontent.com/coreos/flannel/v0.9.1/Documentation/kube-flannel.yml >> pod_network_setup.txt
while running the command : “kubectl apply -f https://raw.githubusercontent.com/coreos/flannel/v0.9.1/Documentation/kube-flannel.yml”
I’m getting the error "Unable to connect to the server: EOF " any idea what is broken or how I can debug it?
Thanks Tal
@bsder Just for completeness, there’s one extra thing wrong with the setup ( if you could adjust the blog post so other people don’t fall into this rabbit hole ). The fact that the blog uses ubuntu is an issue for kube-dns since it builds on the dns of the host system.
Ubuntu runs a dnsmasq internally, meaning that from the nodes inside of the cluster you won’t be able to reach the outside world.
To fix this you need to add an extra configmap for kube-dns to specify upstream nameservers :
apiVersion: v1
kind: ConfigMap
metadata:
name: kube-dns
namespace: kube-system
data:
upstreamNameservers: |
["8.8.8.8", "8.8.4.4"]
For more information regarding this, here’s some documentation (https://kubernetes.io/docs/tasks/administer-cluster/dns-custom-nameservers/#configure-stub-domain-and-upstream-dns-servers) and here’s an issue on github talking about this ( https://github.com/coreos/flannel/issues/983 ).
Following this guide, kubelet isn’t starting up and has a status of 255.
Also: failed to load Kubelet config file /var/lib/kubelet/config.yaml, error failed to read kubelet config file "/var/lib/kubelet/config.yaml", error: open /var/lib/kubelet/config.yaml: no such file
is in the logs for the systemd service
Hi,
I am wondering how to configure persistent volumes on the worker nodes. Basically, I get the following errors when I try and create my kubernetes cluster with kubectl create -f app.yaml:
kubectl describe pods
Conditions:
Type Status
PodScheduled False
Volumes:
tmdir:
Type: PersistentVolumeClaim (a reference to a PersistentVolumeClaim in the same namespace)
ClaimName: tmdir-bftx-0
ReadOnly: false
appdir:
Type: PersistentVolumeClaim (a reference to a PersistentVolumeClaim in the same namespace)
ClaimName: appdir-bftx-0
ReadOnly: false
tmconfigdir:
Type: ConfigMap (a volume populated by a ConfigMap)
Name: bftx-config
Optional: false
appconfigdir:
Type: ConfigMap (a volume populated by a ConfigMap)
Name: app-config
Optional: false
socksdir:
Type: EmptyDir (a temporary directory that shares a pod's lifetime)
Medium:
default-token-rb5hr:
Type: Secret (a volume populated by a Secret)
SecretName: default-token-rb5hr
Optional: false
QoS Class: BestEffort
Node-Selectors: <none>
Tolerations: node.kubernetes.io/not-ready:NoExecute for 300s
node.kubernetes.io/unreachable:NoExecute for 300s
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Warning FailedScheduling 5s (x11 over 32s) default-scheduler pod has unbound PersistentVolumeClaims (repeated 2 times)
kubectl describe pvc
Name: appdir-bftx-0
Namespace: default
StorageClass:
Status: Pending
Volume:
Labels: app=bftx
Annotations: volume.alpha.kubernetes.io/storage-class=anything
Finalizers: [kubernetes.io/pvc-protection]
Capacity:
Access Modes:
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal FailedBinding 2m (x103 over 27m) persistentvolume-controller no persistent volumes available for this claim and no storage class is set
Name: tmdir-bftx-0
Namespace: default
StorageClass:
Status: Pending
Volume:
Labels: app=bftx
Annotations: volume.alpha.kubernetes.io/storage-class=anything
Finalizers: [kubernetes.io/pvc-protection]
Capacity:
Access Modes:
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal FailedBinding 2m (x103 over 27m) persistentvolume-controller no persistent volumes available for this claim and no storage class is set
I’m looking at using something called rexray, but I’m not so sure I’ll be able to get the cluster using it. Ideally, the cluster would be able to tap into the ssd storage that is bundled with each node.
Thanks for the brilliantly authored tutorial. It really helped me learning and setting up the k8s environment and deployment of services. However, I have a setup of two Ubuntu VMs (1-Master, 1-Worker) and setting up a communication via SSH between VMs and altering the configs in k8x was a real pain. But anyway it helped a lot.
Hi folks. I created a GitLab Repo that contains the Ansible mentioned in the tutorial, as well as some of the tweaks mentioned in the comments. Feel free to help improve it: https://gitlab.com/chicken231/ubuntu-kubernetes-ansible
TASK [copy admin.conf to user's kube config] ***************************************************************************************************************************************************************
fatal: [master]: FAILED! => {"changed": false, "msg": "Source /etc/kubernetes/admin.conf not found"}
to retry, use: --limit @/Users/erik/Documents/repos/kube-cluster/master.retry
hello,
i’m pretty sure this tutorial is the one i need but im facing issues due to my lack of experience.
do the servers ( =workers) can be VM guests ? if so, i can’t succeed to find the fine ip addresses for the worker nodes.
thanks in advance