Skip to content

Instantly share code, notes, and snippets.

Working on VMware Tanzu Kubernetes Grid

Jesse Hu jessehu

Working on VMware Tanzu Kubernetes Grid
  • Beijing, China
View GitHub Profile
jessehu /
Last active October 16, 2021 03:49
Install RabbitMQ Helm Chart
# Homepage:
# Note: Specify `--set clustering.enabled=false` in Minikube with a single k8s node.
helm repo add bitnami
helm install -n rabbitmq-system --create-namespace rabbitmq bitnami/rabbitmq \
--set clustering.enabled=false \
--set auth.username=user --set auth.password=pass \
--set persistence.size=1Gi \
jessehu / 01_additional_ca_certs.yaml
Last active February 28, 2023 08:09
View 01_additional_ca_certs.yaml
#@ load("@ytt:overlay", "overlay")
#@ load("@ytt:data", "data")
#! This ytt overlay adds additional custom CA certificates on TKG cluster nodes, so containerd and other tools trust these CA certificates.
#! It works when using Photon or Ubuntu as the TKG node template on all TKG infrastructure providers.
#! Trust your custom CA certificates on all Control Plane nodes.
#@overlay/match by=overlay.subset({"kind":"KubeadmControlPlane"})
jessehu / gist:903cf39200c1db965f1b0c28e60f9efb
Created July 9, 2019 02:37
Helm Tiller RBAC setup for K8s v1.6+
View gist:903cf39200c1db965f1b0c28e60f9efb
Helm RBAC setup for K8s v1.6+
kubectl -n kube-system create sa tiller
kubectl create clusterrolebinding tiller --clusterrole cluster-admin --serviceaccount=kube-system:tiller
helm init --service-account tiller
Error: configmaps is forbidden: User "system:serviceaccount:kube-system:default" cannot list resource "configmaps" in API group "" in the namespace "kube-system"

Commit Message Guidelines

Short (72 chars or less) summary

More detailed explanatory text. Wrap it to 72 characters. The blank
line separating the summary from the body is critical (unless you omit
the body entirely).

Write your commit message in the imperative: "Fix bug" and not "Fixed
bug" or "Fixes bug." This convention matches up with commit messages
jessehu / gist:c580b58a259d1fb205ea82713b0169d1
Created March 29, 2018 08:03
Change IP of vCenter 6.5
View gist:c580b58a259d1fb205ea82713b0169d1
Open a console session of the VCSA
Login as: root
Default password is: vmware
Execute the following command: /opt/vmware/share/vami/vami_config_net
After executing the command, a menu is displayed. Within the menu It is possible to change the IP address, hostname, DNS, Default gateway and proxy server.
Execute 'reboot'
jessehu / gist:8997c4e8f781d726d4583cd98e93b298
Created March 6, 2018 03:54
Curl for getting docker image tags
View gist:8997c4e8f781d726d4583cd98e93b298
# 'username:password' is required for non-public image repo
curl -s
jessehu / gist:90f7c00efe8fd8c5bf74d304faa62a7c
Created June 29, 2017 08:37
Basic of Using VMware vRealize Automation
View gist:90f7c00efe8fd8c5bf74d304faa62a7c
Here is the process for using vRA to deploy a sample OpenStack VM:
Login as admin (I use configadmin), go to 基础架构(Infrastructure)
create an OpenStack End Point for OpenStack Kilo
create fabric group (架构组), select the discovery OpenStack Region as 'Compute resources'
Go to 管理 -> 用户和组 -> 业务组
jessehu / gist:2e28b2d8ab454e67712cd943a8500512
Created October 26, 2016 02:40
List linked mode vCenter Servers 6.0 or other Service Endpoints from PSC
View gist:2e28b2d8ab454e67712cd943a8500512
from pyVim import connect
import requests
import sys, ssl
from xml.etree.ElementTree import XML, fromstring, tostring
from requests.packages.urllib3.exceptions import InsecureRequestWarning
jessehu / gist:deacfae0996b7c13673f
Created July 7, 2014 07:33
Disable unneccessary ohai plugins to compact the chef node size so as to speed up chef get/search API calls
View gist:deacfae0996b7c13673f
In Ohai 7, the ohai plugin name is not the plugin file name, but defined in the plugin file. Here is what I used in Ohai 7.0.4 :
Ohai::Config[:disabled_plugins] = [:Azure, :Filesystem, :Cloudv2, :Virtualization, :Virtualizationinfo, :Dmi, :Zpools, :Blockdevice, :Lsb, :Nodejs, :Languages, :Php, :Lua, :Perl, :C, :Java, :Python, :Erlang, :Groovy, :Ruby, :Mono, :Os, :Openstack, :Cloud, :Rackspace, :Ps, :Command, :Initpackage, :Rootgroup, :Keys, :Sshhostkey, :Ohai, :Chef, :Ohaitime, :Passwd, :Gce, :Systemprofile, :Linode, :Ipscopes, :Eucalyptus, :Ec2]
jessehu / runknife.rb
Created February 21, 2013 03:32
a ruby script for calling Ironfan's cluster class.
View runknife.rb
#!/usr/bin/env ruby
require 'chef'
require 'chef/knife'
require 'ironfan'
require 'chef/knife/cluster_bootstrap.rb'
knife =