\documentclass[10pt,a4paper]{article} % Packages \usepackage{fancyhdr} % For header and footer \usepackage{multicol} % Allows multicols in tables \usepackage{tabularx} % Intelligent column widths \usepackage{tabulary} % Used in header and footer \usepackage{hhline} % Border under tables \usepackage{graphicx} % For images \usepackage{xcolor} % For hex colours %\usepackage[utf8x]{inputenc} % For unicode character support \usepackage[T1]{fontenc} % Without this we get weird character replacements \usepackage{colortbl} % For coloured tables \usepackage{setspace} % For line height \usepackage{lastpage} % Needed for total page number \usepackage{seqsplit} % Splits long words. %\usepackage{opensans} % Can't make this work so far. Shame. Would be lovely. \usepackage[normalem]{ulem} % For underlining links % Most of the following are not required for the majority % of cheat sheets but are needed for some symbol support. \usepackage{amsmath} % Symbols \usepackage{MnSymbol} % Symbols \usepackage{wasysym} % Symbols %\usepackage[english,german,french,spanish,italian]{babel} % Languages % Document Info \author{DASKAjA} \pdfinfo{ /Title (muz-kubernetes-cluster.pdf) /Creator (Cheatography) /Author (DASKAjA) /Subject (MuZ Kubernetes Cluster Cheat Sheet) } % Lengths and widths \addtolength{\textwidth}{6cm} \addtolength{\textheight}{-1cm} \addtolength{\hoffset}{-3cm} \addtolength{\voffset}{-2cm} \setlength{\tabcolsep}{0.2cm} % Space between columns \setlength{\headsep}{-12pt} % Reduce space between header and content \setlength{\headheight}{85pt} % If less, LaTeX automatically increases it \renewcommand{\footrulewidth}{0pt} % Remove footer line \renewcommand{\headrulewidth}{0pt} % Remove header line \renewcommand{\seqinsert}{\ifmmode\allowbreak\else\-\fi} % Hyphens in seqsplit % This two commands together give roughly % the right line height in the tables \renewcommand{\arraystretch}{1.3} \onehalfspacing % Commands \newcommand{\SetRowColor}[1]{\noalign{\gdef\RowColorName{#1}}\rowcolor{\RowColorName}} % Shortcut for row colour \newcommand{\mymulticolumn}[3]{\multicolumn{#1}{>{\columncolor{\RowColorName}}#2}{#3}} % For coloured multi-cols \newcolumntype{x}[1]{>{\raggedright}p{#1}} % New column types for ragged-right paragraph columns \newcommand{\tn}{\tabularnewline} % Required as custom column type in use % Font and Colours \definecolor{HeadBackground}{HTML}{333333} \definecolor{FootBackground}{HTML}{666666} \definecolor{TextColor}{HTML}{333333} \definecolor{DarkBackground}{HTML}{326CE5} \definecolor{LightBackground}{HTML}{F2F5FD} \renewcommand{\familydefault}{\sfdefault} \color{TextColor} % Header and Footer \pagestyle{fancy} \fancyhead{} % Set header to blank \fancyfoot{} % Set footer to blank \fancyhead[L]{ \noindent \begin{multicols}{3} \begin{tabulary}{5.8cm}{C} \SetRowColor{DarkBackground} \vspace{-7pt} {\parbox{\dimexpr\textwidth-2\fboxsep\relax}{\noindent \hspace*{-6pt}\includegraphics[width=5.8cm]{/web/www.cheatography.com/public/images/cheatography_logo.pdf}} } \end{tabulary} \columnbreak \begin{tabulary}{11cm}{L} \vspace{-2pt}\large{\bf{\textcolor{DarkBackground}{\textrm{MuZ Kubernetes Cluster Cheat Sheet}}}} \\ \normalsize{by \textcolor{DarkBackground}{DASKAjA} via \textcolor{DarkBackground}{\uline{cheatography.com/74728/cs/43635/}}} \end{tabulary} \end{multicols}} \fancyfoot[L]{ \footnotesize \noindent \begin{multicols}{3} \begin{tabulary}{5.8cm}{LL} \SetRowColor{FootBackground} \mymulticolumn{2}{p{5.377cm}}{\bf\textcolor{white}{Cheatographer}} \\ \vspace{-2pt}DASKAjA \\ \uline{cheatography.com/daskaja} \\ \end{tabulary} \vfill \columnbreak \begin{tabulary}{5.8cm}{L} \SetRowColor{FootBackground} \mymulticolumn{1}{p{5.377cm}}{\bf\textcolor{white}{Cheat Sheet}} \\ \vspace{-2pt}Not Yet Published.\\ Updated 4th October, 2024.\\ Page {\thepage} of \pageref{LastPage}. \end{tabulary} \vfill \columnbreak \begin{tabulary}{5.8cm}{L} \SetRowColor{FootBackground} \mymulticolumn{1}{p{5.377cm}}{\bf\textcolor{white}{Sponsor}} \\ \SetRowColor{white} \vspace{-5pt} %\includegraphics[width=48px,height=48px]{dave.jpeg} Measure your website readability!\\ www.readability-score.com \end{tabulary} \end{multicols}} \begin{document} \raggedright \raggedcolumns % Set font size to small. Switch to any value % from this page to resize cheat sheet text: % www.emerson.emory.edu/services/latex/latex_169.html \footnotesize % Small font. \begin{multicols*}{3} \begin{tabularx}{5.377cm}{x{1.92234 cm} x{2.15119 cm} p{0.50347 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{5.377cm}}{\bf\textcolor{white}{Nodes}} \tn % Row 0 \SetRowColor{LightBackground} master01 & \{\{width=38\}\}192.168.254.{\bf{88}} & \seqsplit{Michael} \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} master02 & 192.168.254.{\bf{89}} & Jens \tn % Row Count 3 (+ 1) % Row 2 \SetRowColor{LightBackground} master03 & 192.168.254.{\bf{90}} & Jarek \tn % Row Count 5 (+ 2) % Row 3 \SetRowColor{white} \textasciitilde{}\textasciitilde{}master04\textasciitilde{}\textasciitilde{} & \textasciitilde{}\textasciitilde{}192.168.254.{\bf{94}}\textasciitilde{}\textasciitilde{} & \tn % Row Count 7 (+ 2) % Row 4 \SetRowColor{LightBackground} worker01 & 192.168.254.{\bf{91}} & Kai \tn % Row Count 8 (+ 1) % Row 5 \SetRowColor{white} worker02 & 192.168.254.{\bf{92}} & \seqsplit{Reiner} \tn % Row Count 10 (+ 2) % Row 6 \SetRowColor{LightBackground} worker03 & 192.168.254.{\bf{93}} & \tn % Row Count 11 (+ 1) % Row 7 \SetRowColor{white} haproxy load balancer\{\{nl\}\} & 192.168.254.{\bf{95}}\textasciicircum{}1\textasciicircum{} & \tn % Row Count 13 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}---} \SetRowColor{LightBackground} \mymulticolumn{3}{x{5.377cm}}{\textasciicircum{}1)\textasciicircum{} Nur innerhalb des Clusters erreichbar. kubectl auf den master nodes greift über den haproxy auf die API zu. \newline \newline Zust{\"a}ndigkeiten wurden am 05.09.2023 in \{\{link="https://mattermost.milchundzucker.de/milchundzucker/pl/wsxuconzwira7j11oysa99ef5h"\}\}Mattermost\{\{/link\}\} festgelegt.} \tn \hhline{>{\arrayrulecolor{DarkBackground}}---} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{1.14471 cm} x{3.83229 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{MetalLB Pools}} \tn % Row 0 \SetRowColor{LightBackground} \seqsplit{`production`} & 192.168.254.{\bf{188}} –\{\{nl\}\}192.168.254.{\bf{192}} \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} \seqsplit{`testing`} & 192.168.254.{\bf{193}} –\{\{nl\}\}192.168.254.{\bf{197}} \tn % Row Count 4 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \SetRowColor{LightBackground} \mymulticolumn{2}{x{5.377cm}}{Annotation {\bf{metallb.universe.tf/address-pool}} um Services vom Typ `LoadBalancer` eine IP aus dem entsprechenden Pool zuweisen zu lassen. {\bf{metallb.universe.tf/loadBalancerIPs}} um eine konkrete IP-Adresse zuzuweisen. →~\{\{link="https://metallb.universe.tf/usage/"\}\}MetalLB Usage Dokumentation\{\{/link\}\}} \tn \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Kubernetes Dashboard}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{Neuen Login-Token generieren} \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{`kubectl -n kubernetes-dashboard\{\{nl\}\} create token admin-user`} \tn % Row Count 3 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}-} \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{Dashboard: \seqsplit{https://192.168.254.188/\#/login}} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{kubectl}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{{\bf{Kubernetes Version ausgeben}}\{\{nl\}\}`k version -{}-short`} \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{Liste aller Resourcen inkl. Abkürzungen}}\{\{nl\}\}`k api-resources`} \tn % Row Count 4 (+ 2) % Row 2 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{{\bf{Konfiguration anzeigen}}\{\{nl\}\}`k config view {[}-{}-minify{]}`\{\{nl\}\} oder mit Highlighting am Mac \{\{nl\}\}`k config view | bat -l yml`} \tn % Row Count 7 (+ 3) % Row 3 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{Context anzeigen}}\{\{nl\}\}`k config current-context`} \tn % Row Count 9 (+ 2) % Row 4 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{{\bf{Context setzen}}\{\{nl\}\}`k config use-context \textless{}context-name\textgreater{}`} \tn % Row Count 11 (+ 2) % Row 5 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{Tempor{\"a}r einen anderen Context benutzen}}\{\{nl\}\}`k -{}-context=\textless{}context-name\textgreater{} get nodes`} \tn % Row Count 13 (+ 2) % Row 6 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{{\bf{Netzwerkprobleme debuggen}}\{\{nl\}\}`k run -i -{}-tty debug2 -{}-rm \textbackslash{}\{\{nl\}\} -{}-image=alpine -{}- sh \textbackslash{}\{\{nl\}\} -c "apk add -{}-no-cache \textbackslash{}\{\{nl\}\} curl bind-tools \&\& sh"`} \tn % Row Count 17 (+ 4) \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Helm}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{{\bf{Repos anzeigen}}\{\{nl\}\}`helm repo ls`} \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{Repo hinzufügen}}\{\{nl\}\}`helm repo add \textless{}repo-name\textgreater{} \textless{}url\textgreater{}`} \tn % Row Count 3 (+ 2) % Row 2 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{{\bf{Chats in einem Repo auflisten}}\{\{nl\}\}`helm search repo traefik`} \tn % Row Count 5 (+ 2) % Row 3 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{Ältere Versionen eines Charts auflisten}}\{\{nl\}\}`helm search repo traefik/traefik \textbackslash{}\{\{nl\}\} -{}-versions`} \tn % Row Count 8 (+ 3) % Row 4 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{{\bf{Installierte Charts auflisten}}\{\{nl\}\}`helm ls {[}-{}-all-namespaces{]}`} \tn % Row Count 10 (+ 2) % Row 5 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{Chart installieren}}\{\{nl\}\}`helm install \textless{}release\textgreater{} \textbackslash{}\{\{nl\}\} {[}-{}-namespace \textless{}namespace\textgreater{}{]} \textbackslash{}\{\{nl\}\} {[}-{}-set key1=val1,key2=val2{]} \textbackslash{}\{\{nl\}\} {[}-{}-values \textless{}yaml-file/url\textgreater{}{]} \textbackslash{}\{\{nl\}\} {[}-{}-dry-run -{}-debug{]} \textbackslash{}\{\{nl\}\} {[}-{}-dependency-update {]} \textbackslash{}\{\{nl\}\} \textless{}repo\textgreater{}/\textless{}chart\textgreater{}`} \tn % Row Count 15 (+ 5) % Row 6 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{{\bf{Chart upgraden inkl. Rollback}}\{\{nl\}\}`helm upgrade \textless{}release\textgreater{} \textless{}chart\textgreater{} \textbackslash{}\{\{nl\}\} -{}-atomic `} \tn % Row Count 17 (+ 2) % Row 7 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{Chart deinstallieren}}\{\{nl\}\}`helm uninstall \textless{}release\textgreater{}`} \tn % Row Count 19 (+ 2) % Row 8 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{{\bf{Chart Innereien anzeigen}}\{\{nl\}\}`helm show all \textless{}repo\textgreater{}/\textless{}chart\textgreater{}`} \tn % Row Count 21 (+ 2) % Row 9 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{Chart Standard-Werte anzeigen}}\{\{nl\}\}`helm show values \textless{}repo\textgreater{}/\textless{}chart\textgreater{}`} \tn % Row Count 23 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}-} \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{Mehr Kommandos: \{\{link="https://helm.sh/docs/intro/cheatsheet/"\}\}Offizielles Cheatsheet\{\{/link\}\}} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{1.05271 cm} p{0.68655 cm} x{2.83774 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{5.377cm}}{\bf\textcolor{white}{kubectl get Shortnames}} \tn % Row 0 \SetRowColor{LightBackground} \{\{fa-cog\}\} & cj & {\bf{c}}ron{\bf{j}}obs \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} \{\{fa-file\}\} & cm & {\bf{c}}onfig{\bf{m}}aps \tn % Row Count 4 (+ 2) % Row 2 \SetRowColor{LightBackground} & crd, crds & {\bf{c}}ustom{\bf{r}}esource{\bf{d}}efinition{\bf{s}} \tn % Row Count 6 (+ 2) % Row 3 \SetRowColor{white} & cs & {\bf{c}}omponent{\bf{s}}tatuses \tn % Row Count 8 (+ 2) % Row 4 \SetRowColor{LightBackground} & csr & {\bf{c}}ertificate{\bf{s}}igning{\bf{r}}equests \tn % Row Count 10 (+ 2) % Row 5 \SetRowColor{white} & {\bf{deploy}} & {\bf{deploy}}ments \tn % Row Count 12 (+ 2) % Row 6 \SetRowColor{LightBackground} & {\bf{ds}} & {\bf{d}}aemon{\bf{s}}ets \tn % Row Count 13 (+ 1) % Row 7 \SetRowColor{white} & ep & {\bf{e}}nd{\bf{p}}oints \tn % Row Count 14 (+ 1) % Row 8 \SetRowColor{LightBackground} & ev & {\bf{ev}}ents \tn % Row Count 15 (+ 1) % Row 9 \SetRowColor{white} & hpa & {\bf{h}}orizontal{\bf{p}}od{\bf{a}}utoscalers \tn % Row Count 17 (+ 2) % Row 10 \SetRowColor{LightBackground} & ing & {\bf{ing}}resses \tn % Row Count 18 (+ 1) % Row 11 \SetRowColor{white} & \seqsplit{limits} & {\bf{limit}}range{\bf{s}} \tn % Row Count 19 (+ 1) % Row 12 \SetRowColor{LightBackground} \{\{fa-shield\}\} & \seqsplit{netpol} & {\bf{net}}work{\bf{pol}}icies \tn % Row Count 21 (+ 2) % Row 13 \SetRowColor{white} \{\{fa-server\}\} & {\bf{no}} & {\bf{no}}des \tn % Row Count 23 (+ 2) % Row 14 \SetRowColor{LightBackground} \{\{fa-list\}\} & {\bf{ns}} & {\bf{n}}ame{\bf{s}}paces \tn % Row Count 25 (+ 2) % Row 15 \SetRowColor{white} & pc & {\bf{p}}riority{\bf{c}}lasses \tn % Row Count 26 (+ 1) % Row 16 \SetRowColor{LightBackground} & pdb & {\bf{p}}od{\bf{d}}isruption{\bf{b}}udgets \tn % Row Count 28 (+ 2) % Row 17 \SetRowColor{white} \{\{fa-podcast\}\} & {\bf{po}} & {\bf{po}}ds \tn % Row Count 30 (+ 2) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{5.377cm}{x{1.05271 cm} p{0.68655 cm} x{2.83774 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{5.377cm}}{\bf\textcolor{white}{kubectl get Shortnames (cont)}} \tn % Row 18 \SetRowColor{LightBackground} \{\{fa-database\}\} & {\bf{pv}} & {\bf{p}}ersistent{\bf{v}}olumes \tn % Row Count 2 (+ 2) % Row 19 \SetRowColor{white} & {\bf{pvc}} & {\bf{p}}ersistent{\bf{v}}olume{\bf{c}}laims \tn % Row Count 4 (+ 2) % Row 20 \SetRowColor{LightBackground} & quota & resource{\bf{quota}}s \tn % Row Count 5 (+ 1) % Row 21 \SetRowColor{white} & rc & {\bf{r}}eplication{\bf{c}}ontrollers \tn % Row Count 7 (+ 2) % Row 22 \SetRowColor{LightBackground} & rs & {\bf{r}}eplica{\bf{s}}ets \tn % Row Count 8 (+ 1) % Row 23 \SetRowColor{white} \{\{fa-user\}\} & {\bf{sa}} & {\bf{s}}ervice{\bf{a}}ccounts \tn % Row Count 10 (+ 2) % Row 24 \SetRowColor{LightBackground} & sc & {\bf{s}}torage{\bf{c}}lasses \tn % Row Count 11 (+ 1) % Row 25 \SetRowColor{white} & sts & {\bf{st}}ateful{\bf{s}}ets \tn % Row Count 12 (+ 1) % Row 26 \SetRowColor{LightBackground} & {\bf{svc}} & {\bf{s}}er{\bf{v}}i{\bf{c}}es \tn % Row Count 14 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}---} \SetRowColor{LightBackground} \mymulticolumn{3}{x{5.377cm}}{Eine Liste aller im Cluster verfügbaren Resource inkl. Shortnames: \{\{nl\}\}`kubectl api-resources {[}-o wide{]}`} \tn \hhline{>{\arrayrulecolor{DarkBackground}}---} \end{tabularx} \par\addvspace{1.3em} % That's all folks \end{multicols*} \end{document}