<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def generate_kubernetes(self):
 """ Generate a sample kubernetes """

        example = {}
        example['spec'] = {}
        example['spec']['containers'] = []
        example['spec']['containers'].append({"name": '', "image": '', "env": []})
        for key, value in self.spec.items():
            if value['type'] in (dict, list):
                kvalue = f"\'{json.dumps(value.get('example', ''))}\'"
            else:
                kvalue = f"{value.get('example', '')}"
            entry = {"name": f"{self.env_prefix}_{key.upper()}", "value": kvalue}
            example['spec']['containers'][0]['env'].append(entry)
        print(yaml.dump(example, default_flow_style=False))